Package

purescript-karma-test-unit

Repository
coot/purescript-karma-test-unit
License
MIT
Uploaded by
coot
Published on
2018-06-30T07:04:22Z

Just run npm test and you will see PureScript code run inside Karma.

A simple karma configuration:

module.exports = config => {
  config.set({
    autoWatch: true,
    browsers: ["Chrome"],
    files: [
      "karma/index.js",
    ],
    reporters: ["spec"],
    singleRun: false
  })
}

Then just compile your tests to karma/index.js with

pulp browserify --main 'Test.Main' -I test --to karma/index.js

and run the tests with

karma start --single-run

Check the packcage.json to see how to automate that with npm scripts.