Skip to content

Instantly share code, notes, and snippets.

@andrewconnell
Last active April 15, 2019 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewconnell/aabdd3c8a6afd701e5908773de96b3f7 to your computer and use it in GitHub Desktop.
Save andrewconnell/aabdd3c8a6afd701e5908773de96b3f7 to your computer and use it in GitHub Desktop.
Jest basic configuration for SPFx projects
{
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json"
],
"moduleNameMapper": {
"\\.(css|scss)$": "identity-obj-proxy",
"^resx-strings/en-us.json": "<rootDir>/../node_modules/@microsoft/sp-core-library/lib/resx-strings/en-us.json"
},
"rootDir": "../src",
"testMatch": [
"**/src/**/*.spec.+(ts|tsx|js)"
],
"testURL": "http://localhost",
"transform": {
"^.+\\.(ts|tsx)$": "ts-jest"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment