From ffce4ed1bf2b210acfa38a77c58a40e424671425 Mon Sep 17 00:00:00 2001 From: Philippe Ozil <5071767+pozil@users.noreply.github.com> Date: Fri, 30 Apr 2021 16:45:44 +0200 Subject: [PATCH] feat: added default jest config in new project template (#289) --- .../plugin-templates/test/commands/project/create.test.ts | 1 + packages/templates/src/generators/projectGenerator.ts | 1 + packages/templates/src/templates/project/jest.config.js | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 packages/templates/src/templates/project/jest.config.js diff --git a/packages/plugin-templates/test/commands/project/create.test.ts b/packages/plugin-templates/test/commands/project/create.test.ts index 0b9f70b5..fb4049bc 100644 --- a/packages/plugin-templates/test/commands/project/create.test.ts +++ b/packages/plugin-templates/test/commands/project/create.test.ts @@ -29,6 +29,7 @@ const filestocopy = [ '.gitignore', '.prettierignore', '.prettierrc', + 'jest.config.js', 'package.json' ]; const emptyfolderarray = ['aura', 'lwc']; diff --git a/packages/templates/src/generators/projectGenerator.ts b/packages/templates/src/generators/projectGenerator.ts index d49db2f5..acb39532 100644 --- a/packages/templates/src/generators/projectGenerator.ts +++ b/packages/templates/src/generators/projectGenerator.ts @@ -31,6 +31,7 @@ const filestocopy = [ GITIGNORE, '.prettierignore', '.prettierrc', + 'jest.config.js', 'package.json' ]; const emptyfolderarray = ['aura', 'lwc']; diff --git a/packages/templates/src/templates/project/jest.config.js b/packages/templates/src/templates/project/jest.config.js new file mode 100644 index 00000000..f5a9fed2 --- /dev/null +++ b/packages/templates/src/templates/project/jest.config.js @@ -0,0 +1,6 @@ +const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config'); + +module.exports = { + ...jestConfig, + modulePathIgnorePatterns: ['/.localdevserver'] +};