Skip to content

Commit

Permalink
chore: slight tweak to position of test
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Jan 6, 2019
1 parent 28b6d09 commit 62d7fb8
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions test/src/nyc-tap.js
Expand Up @@ -410,6 +410,26 @@ describe('nyc', function () {
fs.unlinkSync(needsTranspilePath)
return done()
})

it('does not attempt to transpile files when they are excluded', function (done) {
var notNeedTranspilePath = path.join(fixtures, './do-not-need-transpile.do-not-transpile')
fs.writeFileSync(
notNeedTranspilePath,
'--> pork chop sandwiches <--\nvar a = 99',
'utf-8'
)

var nyc = (new NYC(configUtil.buildYargs(fixtures).parse([
'--require=./test/fixtures/transpile-hook',
'--extension=.do-not-transpile',
'--include=needs-transpile.do-not-transpile'
])))

nyc.reset()
nyc.addAllFiles()
fs.unlinkSync(notNeedTranspilePath)
return done()
})
})

it('transpiles non-.js files added via addAllFiles', function (done) {
Expand Down Expand Up @@ -440,26 +460,6 @@ describe('nyc', function () {
return done()
})

it('Do not transpiles files when not included', function (done) {
var notNeedTranspilePath = path.join(fixtures, './do-not-need-transpile.do-not-transpile')
fs.writeFileSync(
notNeedTranspilePath,
'--> pork chop sandwiches <--\nvar a = 99',
'utf-8'
)

var nyc = (new NYC(configUtil.buildYargs(fixtures).parse([
'--require=./test/fixtures/transpile-hook',
'--extension=.do-not-transpile',
'--include=needs-transpile.do-not-transpile'
])))

nyc.reset()
nyc.addAllFiles()
fs.unlinkSync(notNeedTranspilePath)
return done()
})

describe('cache', function () {
it('handles collisions', function (done) {
var nyc = new NYC(configUtil.buildYargs(fixtures).parse())
Expand Down

0 comments on commit 62d7fb8

Please sign in to comment.