Skip to content

coot/purescript-karma-test-unit

Repository files navigation

Karma runner for PureScript Test.Unit package

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.