UNPKG

1.31 kBJavaScriptView Raw
1/*
2 * Copyright (c) 2018, salesforce.com, inc.
3 * All rights reserved.
4 * SPDX-License-Identifier: MIT
5 * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6 */
7module.exports = {
8 moduleFileExtensions: ['js', 'html'],
9 moduleNameMapper: {
10 '^assert$': require.resolve('./src/stubs/assert.js'),
11 '^aura$': require.resolve('./src/stubs/aura.js'),
12 '^aura-instrumentation$': require.resolve('./src/stubs/auraInstrumentation.js'),
13 '^instrumentation-service$': require.resolve('./src/stubs/auraInstrumentation.js'),
14 '^aura-storage$': require.resolve('./src/stubs/auraStorage.js'),
15 '^logger$': require.resolve('./src/stubs/logger.js'),
16
17 '^lwc-test-utils$': require.resolve('@lwc/test-utils'),
18 },
19 resolver: require.resolve('@lwc/jest-resolver'),
20 transform: {
21 '^.+\\.(js|html|css)$': require.resolve('@lwc/jest-transformer'),
22 },
23 setupFiles: [require.resolve('./src/setup')],
24 snapshotSerializers: [require.resolve('@lwc/jest-serializer')],
25 testMatch: ['**/__tests__/**/?(*.)(spec|test).js'],
26
27 // temp workaround until this is released - https://github.com/facebook/jest/pull/6792
28 testURL: 'http://localhost/',
29 coveragePathIgnorePatterns: ['.css$', '.html$'],
30};