fix(#108): remove absolute path in emitted d.ts

This commit is contained in:
harttle
2019-02-26 00:43:30 +08:00
parent 75b3e15ca9
commit 53a835ab54
103 changed files with 275 additions and 343 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import * as chai from 'chai'
import assert from 'src/util/assert'
import assert from '../../../src/util/assert'
const expect = chai.expect
+1 -1
View File
@@ -7,7 +7,7 @@ const expect = chai.expect
chai.use(sinonChai)
chai.use(chaiAsPromised)
const P = require('src/util/promise')
const P = require('../../../src/util/promise')
describe('util/promise', function () {
describe('.mapSeries()', async function () {
+1 -1
View File
@@ -1,5 +1,5 @@
import * as chai from 'chai'
import t from 'src/util/strftime'
import t from '../../../src/util/strftime'
const expect = chai.expect
+3 -19
View File
@@ -1,30 +1,14 @@
import * as chai from 'chai'
import * as sinonChai from 'sinon-chai'
import * as sinon from 'sinon'
import { RenderError, RenderBreakError } from 'src/util/error'
import * as _ from 'src/util/underscore'
import ITemplate from 'src/template/itemplate'
import { RenderError, RenderBreakError } from '../../../src/util/error'
import * as _ from '../../../src/util/underscore'
import ITemplate from '../../../src/template/itemplate'
const expect = chai.expect
chai.use(sinonChai)
describe('util/underscore', function () {
describe('.isError()', function () {
it('should return true for new Error', function () {
expect(_.isError(new Error())).to.be.true
})
it('should return true for RenderError', function () {
const tpl = {
token: {
input: 'xx'
}
} as ITemplate
expect(_.isError(new RenderError(new Error(), tpl))).to.be.true
})
it('should return true for RenderBreakError', function () {
expect(_.isError(new RenderBreakError(''))).to.be.true
})
})
describe('.isString()', function () {
it('should return true for literal string', function () {
expect(_.isString('foo')).to.be.true