Test you plugins with an actual instance of Broccoli building or serving content. Broccoli will be run non-blocking in a separate Process.
'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
})
npm install broccoli-test-runner --save-dev
This project is distributed under the MIT license.