This repository was archived by the owner on Feb 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 11import { EventHub } from '../../src/core/event'
2- import { expect } from 'chai'
2+ import { expect , assert } from 'chai'
33import { install } from '../dom.nyc'
44
55describe ( '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+ } )
Original file line number Diff line number Diff line change 22 "compilerOptions" : {
33 "lib" : [" es2015" , " dom" ],
44 "target" : " es5" ,
5- "module" : " es6" ,
6- "moduleResolution" : " node" ,
75 "declaration" : true ,
86 "outDir" : " release/" ,
97 "sourceMap" : false ,
You can’t perform that action at this time.
0 commit comments