BugMagnet uses WebPack for packaging, Jasmine for tests (executed via Testem) and ESLint for linting. All the main scripts are in package.json
- (optional, if you want to run it in a sandbox) Run the command once to build a development docker VM
make init- (optional, if you want to run it in a sandbox) to start the development shell in docker, run
make shell- install dependencies
npm inpm run pack-extensionThis will create and copy the files in the pack dir. You can then zip that up and distribute as an extension, or just load into a browser as an unpacked extension. (check out how to do this in Chrome or Firefox).
npm tnpm run sourcemap <packed URL without the origin and starting />For example, given this test report:
11) [Chrome 61.0] executeRequest size generator sets the field content to a text of specified size by multiplying the template
TypeError: handler is not a function
TypeError: handler is not a function
at UserContext.<anonymous> (http://localhost:7357/testem/compiled/common/execute-request-spec.js:165:4)
at attempt (http://localhost:7357/jasmine/jasmine.js:4289:46)
at QueueRunner.run (http://localhost:7357/jasmine/jasmine.js:4217:20)
at QueueRunner.execute (http://localhost:7357/jasmine/jasmine.js:4199:10)
at Spec.queueRunnerFactory (http://localhost:7357/jasmine/jasmine.js:909:35)
at Spec.execute (http://localhost:7357/jasmine/jasmine.js:526:10)
at UserContext.fn (http://localhost:7357/jasmine/jasmine.js:5340:37)
at attempt (http://localhost:7357/jasmine/jasmine.js:4297:26)
at QueueRunner.run (http://localhost:7357/jasmine/jasmine.js:4217:20)
at QueueRunner.execute (http://localhost:7357/jasmine/jasmine.js:4199:10)you can find out the actual error line using
npm run sourcemap testem/compiled/common/execute-request-spec.js:165:4
npm run test-browser
This will automatically watch the source and test folders and re-run tests as the files change. The --bugmagnet:test_filter trick also works here to restrict the test run to only a subset.