Skip to content

Instantly share code, notes, and snippets.

@stilist
Created November 12, 2014 02:17
Show Gist options
  • Select an option

  • Save stilist/c745deea90941d3a2a0c to your computer and use it in GitHub Desktop.

Select an option

Save stilist/c745deea90941d3a2a0c to your computer and use it in GitHub Desktop.
Unusable test for clear-broccoli-build-target
'use strict'
var Builder = require('broccoli').Builder,
// see https://github.com/stilist/clear-broccoli-build-target
clearBuildTarget = require('../lib/clear-build-target'),
fs = require('fs-extra'),
test = require('tap').test
test('clear build target', function (t) {
var test_dir = 'tmp_test'
var builder = new Builder(test_dir)
builder.build().then(function (hash) {
t.equal(hash.directory, test_dir)
t.ok(fs.existsSync(hash.directory), 'create target directory')
clearBuildTarget()
t.notOk(fs.existsSync(hash.directory), 'remove target directory')
t.end()
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment