forked from ampproject/amp.dev
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
e2e.jest.config.js
24 lines (23 loc) · 932 Bytes
/
e2e.jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const {URL} = require('url');
const config = require('./platform/lib/config.js');
module.exports = {
preset: 'jest-puppeteer',
globals: {
platformUrl: (path) => {
return new URL(path, config.hosts.platform.base).toString();
},
},
testMatch: ['**/*.e2e-test.js'],
moduleNameMapper: {
// TODO: improve: jest will not work with 'module-alias', so we have define the alias here again!
// see https://github.com/ilearnio/module-alias/issues/46
'^@lib/utils$': '<rootDir>/platform/lib/utils/index.js',
'^@lib/(.*?)(.js)?$': '<rootDir>/platform/lib/$1.js',
'^@examples/(.*?)(.js)?$': '<rootDir>/examples/$1.js',
'^@examples$': '<rootDir>/examples/index.js',
'^@boilerplate/(.*?)(.js)?$': '<rootDir>/boilerplate/$1.js',
'\\.(css|less|sass|scss)$': '<rootDir>/platform/lib/utils/noop.js',
'\\.(html|hbs|j2|njk)$': '<rootDir>/platform/lib/utils/noop.js',
},
verbose: false,
};