Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Erasmus <jerasmus@gitlab.com>2019-11-22 10:14:03 +0300
committerJacques Erasmus <jerasmus@gitlab.com>2019-11-22 10:14:03 +0300
commiteb032078e44393a07752cc390aaa0ca785c3b954 (patch)
treeb7362195930bfc51e683c605a1b14a0041804a98 /jest.config.js
parentfc1677f3616847a70c196dfc94f6be7fa83160d0 (diff)
Add Jest as a frontend testing framework
Added Jest as a frontend testing framework
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/jest.config.js b/jest.config.js
new file mode 100644
index 00000000..2a0bd2c5
--- /dev/null
+++ b/jest.config.js
@@ -0,0 +1,15 @@
+const moduleNameMapper = {
+ '^~(/.*)$': '<rootDir>/content/frontend$1',
+};
+
+module.exports = {
+ testMatch: ['<rootDir>/spec/javascripts/**/**/*_spec.js'],
+ moduleFileExtensions: ['js', 'json', 'vue'],
+ moduleNameMapper,
+ cacheDirectory: '<rootDir>/tmp/cache/jest',
+ restoreMocks: true,
+ transform: {
+ '^.+\\.js$': 'babel-jest',
+ '^.+\\.vue$': 'vue-jest',
+ },
+};