chore(TypeScript): fix linting and generate .d.ts

This commit is contained in:
harttle
2019-02-17 18:20:04 +08:00
parent 7ee87008c7
commit fc9ebdb90f
79 changed files with 809 additions and 820 deletions
+4 -8
View File
@@ -1,11 +1,7 @@
import { resolve } from '../../src/parser/template'
import * as mock from 'mock-fs'
import * as chai from 'chai'
import { expect } from 'chai'
import * as path from 'path'
import * as chaiAsPromised from 'chai-as-promised'
const expect = chai.expect
chai.use(chaiAsPromised)
describe('template', function () {
before(function () {
@@ -14,10 +10,10 @@ describe('template', function () {
})
})
describe('#resolve()', function () {
it('should resolve based on root', function () {
const filepath = resolve('bar.html', '/foo', { root: [] })
it('should resolve based on root', async function () {
const filepath = await resolve('bar.html', '/foo', { root: [] })
const expected = path.resolve('/foo/bar.html')
return expect(filepath).to.eventually.equal(expected)
return expect(filepath).to.equal(expected)
})
it('should resolve based on root', function () {
return expect(resolve('foo.html', '/foo', { root: [] }))