aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAleh Zasypkin <aleh.zasypkin@gmail.com>2018-02-19 17:02:01 +0100
committerGitHub <noreply@github.com>2018-02-19 17:02:01 +0100
commitf2fda4aca32b16630b122b8911c06c889faef736 (patch)
treed7042ac637e3bf9057cebd61260149da7ae17eca /scripts
parente135657d1f0ad11b1fc9377427306befc3b26242 (diff)
Introduce Jest integration tests. (#16735)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/jest.js3
-rwxr-xr-xscripts/jest_integration.js17
2 files changed, 20 insertions, 0 deletions
diff --git a/scripts/jest.js b/scripts/jest.js
index 5f130a843..c859142c9 100755
--- a/scripts/jest.js
+++ b/scripts/jest.js
@@ -10,5 +10,8 @@
//
// See all cli options in https://facebook.github.io/jest/docs/cli.html
+const { resolve } = require('path');
+process.argv.push('--config', resolve(__dirname, '../src/dev/jest/config.js'));
+
require('../src/babel-register');
require('../src/dev/jest/cli');
diff --git a/scripts/jest_integration.js b/scripts/jest_integration.js
new file mode 100755
index 000000000..ddb26939b
--- /dev/null
+++ b/scripts/jest_integration.js
@@ -0,0 +1,17 @@
+// # Run Jest integration tests
+//
+// All args will be forwarded directly to Jest, e.g. to watch tests run:
+//
+// node scripts/jest_integration --watch
+//
+// or to build code coverage:
+//
+// node scripts/jest_integration --coverage
+//
+// See all cli options in https://facebook.github.io/jest/docs/cli.html
+
+const { resolve } = require('path');
+process.argv.push('--config', resolve(__dirname, '../src/dev/jest/config.integration.js'));
+
+require('../src/babel-register');
+require('../src/dev/jest/cli');