Skip to content

yavin5/jasmine-ts

 
 

Repository files navigation

jasmine-ts

A simplification for running jasmine with ts-node.

Installation

npm install git+https://github.com/yavin5/jasmine-ts --save-dev

Usage

  • In your package.json file create a test script:

    {
      "scripts": {
        "test": "jasmine-ts 'path/to/specs/**/*.spec.ts'"
      }
    }
  • Initialize jasmine

    node_modules/.bin/jasmine-ts init
    

    Note: This module enables the configuration support of reporters. For example, if you want to use the jasmine-spec-reporter, you can add a reporters array to the jasmine.json file like this:

    {
      "reporters": [
        {
          "name": "jasmine-spec-reporter#SpecReporter",
          "options": {
            "displayStacktrace": "all"
          }
        }
      ]
    }

    If the reporters are not the default export of the module, you can reference another export by using the # separator.

  • Run the tests

    npm test
    

About

Executes jasmine tests with ts-node

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 89.7%
  • TypeScript 10.3%