Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

stfsy/broccoli-test-runner

Repository files navigation

Broccoli Test Runner

Build Status Dependency Status DevDependency Status Npm downloads Npm Version Git tag Github issues License

Test you plugins with an actual instance of Broccoli building or serving content. Broccoli will be run non-blocking in a separate Process.

Example

'use strict'

const BroccoliTestRunner = require('broccoli-test-runner')
const broccoliRunner = new BroccoliTestRunner('test/fixtures') // path to build directory with brocfile

describe('Serves', () => {
    before(() => {
       return  broccoliRunner.build()
    })
    after(() => {
        return broccoliRunner.stop()
    })
    it('..', ..) // test your plugin serves content as expected
})

describe('Builds', () = {
    before(() => {
       return  broccoliRunner.build()
    })
    after(() => {
        return broccoliRunner.stop()
    })
    it('..', ..) // test your plugin builds content as expected
})

Installation

npm install broccoli-test-runner --save-dev

License

This project is distributed under the MIT license.