File tree Expand file tree Collapse file tree 4 files changed +30
-2
lines changed
Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 11node_modules
22dist.js
33npm-debug.log
4+ views.db
Original file line number Diff line number Diff line change 1+ language : node_js
2+ node_js :
3+ - node
4+ - 7
5+ - 6
6+ matrix :
7+ allow_failures :
8+ - node_js : 6
9+ script : npm run test
10+ cache : yarn
Original file line number Diff line number Diff line change 44 "description" : " Store your micro-analytics data in flat-file-db!" ,
55 "main" : " dist.js" ,
66 "scripts" : {
7- "test" : " echo \" Error: no test specified \" && exit 1 " ,
7+ "test" : " jest " ,
88 "build" : " async-to-gen index.js --out-file dist.js" ,
99 "prepublish" : " npm run build"
1010 },
3333 "micro-analytics-cli" : " ^1.2.0"
3434 },
3535 "devDependencies" : {
36- "async-to-gen" : " ^1.3.0"
36+ "async-to-gen" : " ^1.3.0" ,
37+ "jest" : " ^19.0.2" ,
38+ "micro-analytics-cli" : " 1.2.0-11"
3739 }
3840}
Original file line number Diff line number Diff line change 1+ const path = require ( 'path' )
2+ const flatfile = require ( 'flat-file-db' )
3+ const promisify = require ( 'then-flat-file-db' )
4+ const test = require ( 'micro-analytics-cli/adapter-tests/unit-tests' )
5+
6+ const db = promisify ( flatfile . sync ( process . env . DB_NAME || 'views.db' ) )
7+
8+
9+ test ( {
10+ name : 'flat-file-db' ,
11+ modulePath : path . resolve ( __dirname , './index.js' ) ,
12+ beforeEach : ( ) => {
13+ return db . clear ( ) ;
14+ }
15+ } )
You can’t perform that action at this time.
0 commit comments