main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
631 bytes
|
Line | |
---|
1 | import glob from 'glob';
|
---|
2 | import Jasmine from 'jasmine';
|
---|
3 |
|
---|
4 | const jasmine = new Jasmine();
|
---|
5 | jasmine.loadConfigFile('test/jasmine.json');
|
---|
6 |
|
---|
7 | const pattern = process.argv[2] || 'test/spec/*.js';
|
---|
8 |
|
---|
9 | // Load your specs
|
---|
10 | glob(pattern, function (er, files) {
|
---|
11 | Promise.all(
|
---|
12 | files
|
---|
13 | // Use relative paths
|
---|
14 | .map(f => f.replace(/^([^\/])/, './$1'))
|
---|
15 | .map(f => import(f)
|
---|
16 | .catch(e => {
|
---|
17 | console.error('** Error loading ' + f + ': ');
|
---|
18 | console.error(e);
|
---|
19 | process.exit(1);
|
---|
20 | }))
|
---|
21 | )
|
---|
22 | .then(() => jasmine.execute());
|
---|
23 | }); |
---|
Note:
See
TracBrowser
for help on using the repository browser.