-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove coverage remove travis include eslint
- Loading branch information
Showing
11 changed files
with
74 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
env: | ||
browser: true | ||
es2021: true | ||
node: true | ||
extends: 'eslint:recommended' | ||
parserOptions: | ||
ecmaVersion: 12 | ||
sourceType: module | ||
rules: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
- run: npm install | ||
- run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
"email": "[email protected]" | ||
}, | ||
"contributors": [ | ||
"Pablo Varela <yo@pablo.pink>" | ||
"Pablo Varela <pablo@pablopunk.com>" | ||
], | ||
"dependencies": { | ||
"camelcase": "^4.1.0", | ||
|
@@ -21,9 +21,8 @@ | |
}, | ||
"devDependencies": { | ||
"ava": "^0.25.0", | ||
"codecov": "^3.1.0", | ||
"eslint": "^7.18.0", | ||
"husky": "^2.2.0", | ||
"nyc": "^13.1.0", | ||
"prettier": "^1.17.0", | ||
"pretty-quick": "^1.10.0" | ||
}, | ||
|
@@ -55,20 +54,11 @@ | |
"singleQuote": true, | ||
"tabWidth": 2 | ||
}, | ||
"nyc": { | ||
"reporter": [ | ||
"lcov", | ||
"html", | ||
"text" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pablopunk/miny" | ||
}, | ||
"scripts": { | ||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", | ||
"test": "npm run test-coverage", | ||
"test-coverage": "nyc ava" | ||
"test": "ava" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
.DS_Store | ||
node_modules | ||
coverage* | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
- run: npm install | ||
- run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,63 +16,30 @@ const mock = { | |
|
||
test('Invalid npm name', async t => { | ||
const err = await t.throws( | ||
sao.mockPrompt( | ||
template, | ||
Object.assign({}, mock, { name: 'ñ' }))) | ||
t.regex(err.message, /package name had non-URL-safe characters/) | ||
}) | ||
|
||
test('No code coverage if no tests', async t => { | ||
const stream = await sao.mockPrompt( | ||
template, | ||
mock | ||
sao.mockPrompt(template, Object.assign({}, mock, { name: 'ñ' })) | ||
) | ||
|
||
const { answers } = stream.meta | ||
t.is(answers.coverage, undefined) | ||
}) | ||
|
||
test('Can have tests without code coverage', async t => { | ||
const stream = await sao.mockPrompt( | ||
template, | ||
{ | ||
...mock, | ||
test: 'ava', | ||
coverage: 'no' | ||
} | ||
) | ||
|
||
const { answers } = stream.meta | ||
t.not(answers.test, 'none') | ||
t.is(answers.coverage, 'no') | ||
t.regex(err.message, /package name had non-URL-safe characters/) | ||
}) | ||
|
||
test('Defaults', async t => { | ||
const stream = await sao.mockPrompt( | ||
template, | ||
{ | ||
name: 'my-project', | ||
email: '[email protected]', | ||
author: 'Pablo Varela', | ||
githubUsername: 'foo', | ||
test: 'none', | ||
coverage: 'yes' | ||
} | ||
) | ||
const stream = await sao.mockPrompt(template, { | ||
name: 'my-project', | ||
email: '[email protected]', | ||
author: 'Pablo Varela', | ||
githubUsername: 'foo', | ||
test: 'none' | ||
}) | ||
const { answers } = stream.meta | ||
t.deepEqual( | ||
answers, | ||
{ | ||
...mock, | ||
name: 'my-project', | ||
description: 'My new npm module', | ||
githubUsername: 'foo', | ||
website: 'http://foo.com', | ||
githubRepo: 'https://github.com/foo/my-project', | ||
authorImg: 'https://gravatar.com/avatar/fa50aeff0ddd6e63273a068b04353d9d?size=100', | ||
keywords: 'miny my-project', | ||
test: 'none', | ||
coverage: 'yes' | ||
} | ||
) | ||
t.deepEqual(answers, { | ||
...mock, | ||
name: 'my-project', | ||
description: 'My new npm module', | ||
githubUsername: 'foo', | ||
website: 'http://foo.com', | ||
githubRepo: 'https://github.com/foo/my-project', | ||
authorImg: | ||
'https://gravatar.com/avatar/fa50aeff0ddd6e63273a068b04353d9d?size=100', | ||
keywords: 'miny my-project', | ||
test: 'none' | ||
}) | ||
}) |