Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit f82ad9c

Browse files
committed
Updating node-tap. Move temp files out of test dir. Add tests to lint routine
1 parent 0a2c8cb commit f82ad9c

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ Thumbs.db
7878
source/css/style.css.map
7979
.idea/
8080
public
81-
test/tmp
81+
tmp

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"starterkit-mustache-demo": "4.0.2",
3030
"eslint": "3.13.1",
3131
"proxyquire": "1.7.10",
32-
"tap": "9.0.3"
32+
"tap": "10.3.0"
3333
},
3434
"files": [
3535
"bin"
@@ -41,9 +41,9 @@
4141
"JavaScript"
4242
],
4343
"scripts": {
44-
"lint": "eslint bin/",
45-
"test": "tap test/*.js --reporter spec",
46-
"pretest": "npm install --only=dev"
44+
"lint": "eslint ./{bin,test}",
45+
"test": "tap './test/*.test.js' --reporter spec --timeout=120",
46+
"pretest": "npm run lint && npm install --only=dev"
4747
},
4848
"repository": {
4949
"type": "git",
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/scaffold.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ const tap = require('tap');
22
const path = require('path');
33
const exists = require('path-exists');
44
const scaffold = require('../bin/scaffold');
5+
const getUniqueProjectPath = require('./utils/getUniqueProjectPath');
56
const wrapAsync = require('../bin/utils').wrapAsync;
67

7-
const projectDir = './test/tmp';
8+
const projectDir = getUniqueProjectPath();
89
const sourceDir = 'source';
910
const publicDir = 'public';
1011
const exportDir = 'patterns_export';

test/utils/getUniqueProjectPath.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ const crypto = require('crypto');
22

33
module.exports = () => {
44
const UUID = crypto.randomBytes(16).toString('hex');
5-
return `./test/tmp/${UUID}`;
5+
return `./tmp/${UUID}`;
66
};

0 commit comments

Comments
 (0)