Last active
June 2, 2020 11:52
-
-
Save Swiip/d1079f4cdcfb56967ba61af12dcfa738 to your computer and use it in GitHub Desktop.
"Testing an AngularJS app with Jest" jest code samples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var localStorageMock = /* ... some mock code ... */ | |
Object.defineProperty(window, 'localStorage', { | |
value: localStorageMock | |
}); | |
import './app/index.module'; | |
import 'angular-mocks'; | |
import './app/mock/utils'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"jest": { | |
"testPathDirs": ["src"], | |
"setupTestFrameworkScriptFile": "src/jest.init.js" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hallo @Swiip can you share a full project to check configs and creating bundles? I'm stucked now in my project by integration jest with ng1