Skip to content
This repository was archived by the owner on Feb 22, 2021. It is now read-only.

Commit fcae2d9

Browse files
committed
refactor(tsconfig): remove target item
style: remove unused
1 parent 516295f commit fcae2d9

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "back-loader",
33
"version": "0.1.3",
4-
"description": "",
4+
"description": "a easy and steady preload lib",
55
"main": "release/index",
66
"unpkg": "release/index.js",
77
"author": "WittBulter(nanazuimeng123@gmail.com)",
88
"homepage": "https://github.com/DhyanaChina/back-loader#readme",
99
"license": "MIT",
1010
"scripts": {
1111
"test": "./node_modules/.bin/mocha",
12-
"cover:local": "./node_modules/.bin/nyc mocha && open coverage/lcov-report/index.html",
13-
"cover:hook": "./node_modules/.bin/nyc mocha && cat ./coverage/lcov.info | coveralls",
12+
"cover:local": "./node_modules/.bin/nyc mocha;open coverage/lcov-report/index.html",
13+
"cover:hook": "./node_modules/.bin/nyc mocha;cat ./coverage/lcov.info | coveralls",
1414
"ex": "tsc ./build/webpack.dev.ts && env DEBUG=true webpack-dev-server --config build/webpack.dev.js --inline --progress --port 1338 && npm run clean:tsc",
1515
"ex:build": "tsc ./build/webpack.prod.ts && rm -rf dist && webpack --config build/webpack.prod.js && npm run clean:tsc",
1616
"release": "tsc -p ./tsconfig.json",

test/core/event.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { EventHub } from '../../src/core/event'
2-
import { expect } from 'chai'
2+
import { expect, assert } from 'chai'
33
import { install } from '../dom.nyc'
44

55
describe('Core function test', () => {
@@ -23,4 +23,19 @@ describe('Core function test', () => {
2323
hub.dispath('test_listen_2', 'once')
2424
})
2525

26-
})
26+
it('should nerve receive any notice', done => {
27+
hub.listen('test_listen_3', (e, d) => expect.fail(d, null))
28+
hub.removeAll()
29+
hub.dispath('test_listen_3', 'once')
30+
setTimeout(done, 100)
31+
})
32+
33+
it('get an event and reject an event', done => {
34+
hub.listen('test_listen_4', () => process.exit(1))
35+
hub.listen('test_listen_5', () => done())
36+
hub.remove('test_listen_4')
37+
hub.dispath('test_listen_4', 'once')
38+
hub.dispath('test_listen_5', 'once')
39+
})
40+
41+
})

tsconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
"compilerOptions": {
33
"lib": ["es2015", "dom"],
44
"target": "es5",
5-
"module": "es6",
6-
"moduleResolution": "node",
75
"declaration": true,
86
"outDir": "release/",
97
"sourceMap": false,

0 commit comments

Comments
 (0)