This commit is contained in:
harttle
2019-01-28 18:06:47 +08:00
parent 7a2e036c79
commit 8a881ac69a
41 changed files with 116 additions and 116 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import {resolve} from '../../src/template.js'
import { resolve } from '../../src/template.js'
import mock from 'mock-fs'
import chai from 'chai'
import path from 'path'
@@ -15,12 +15,12 @@ describe('template', function () {
})
describe('#resolve()', function () {
it('should resolve based on root', function () {
const filepath = resolve('bar.html', '/foo', {root: []})
const filepath = resolve('bar.html', '/foo', { root: [] })
const expected = path.resolve('/foo/bar.html')
return expect(filepath).to.eventually.equal(expected)
})
it('should resolve based on root', function () {
return expect(resolve('foo.html', '/foo', {root: []}))
return expect(resolve('foo.html', '/foo', { root: [] }))
.to.rejectedWith(/Failed to lookup foo.html in: \/foo/)
})
})