Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update googleapis version #111

Closed
wants to merge 25 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
39472ab
Added nyc for testint coverage
JuanMaRuiz Oct 26, 2019
1f65651
Added index test
JuanMaRuiz Oct 26, 2019
e95fe41
Added test to check handleOpts method in index file
JuanMaRuiz Oct 27, 2019
da5adc1
Merge branch 'master' of https://github.com/JuanMaRuiz/psi into featu…
JuanMaRuiz Nov 8, 2019
57fd768
Tests improvements
JuanMaRuiz Nov 8, 2019
f8e7cc7
Added test for threshold
JuanMaRuiz Nov 9, 2019
21a1561
Updated some npm dependencies
JuanMaRuiz Nov 9, 2019
ffb8741
Optimizing unit tests
JuanMaRuiz Nov 9, 2019
695a877
Removed commented tests
JuanMaRuiz Nov 19, 2019
1930431
Merge branch 'feature-optimizing-test' of https://github.com/JuanMaRu…
JuanMaRuiz Nov 19, 2019
a05bdfa
Update test/index.test.js
JuanMaRuiz Nov 21, 2019
6a37baa
Update test/output.test.js
JuanMaRuiz Nov 21, 2019
862aa58
Reverted api-response.test
JuanMaRuiz Nov 21, 2019
6ed67cb
Reverted googleapis npm dependency to previous verison
JuanMaRuiz Nov 21, 2019
94fe536
Added proposed change of test definition
JuanMaRuiz Nov 25, 2019
8e8ab81
Revert unnecessary change
JuanMaRuiz Nov 25, 2019
22c9e77
Moved optionsHandler and getTreshold to options-handler. Removed rewi…
JuanMaRuiz Nov 26, 2019
3b56a1a
Moved getReporter to options-handler
JuanMaRuiz Nov 27, 2019
dbda724
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Nov 27, 2019
31bbc65
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Nov 28, 2019
d546d6c
Merge branch 'master' of https://github.com/JuanMaRuiz/psi
JuanMaRuiz Nov 28, 2019
31473da
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Mar 10, 2020
4c65857
Update googlepais to v40.0.0
JuanMaRuiz Mar 10, 2020
085a3a2
Clean no necessary variables
JuanMaRuiz Mar 11, 2020
abf59c6
Update googleapis to v47.0.0
JuanMaRuiz Mar 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
yarn.lock
.nyc_output/
coverage/
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -7,14 +7,15 @@
"author": {
"name": "Addy Osmani",
"email": "[email protected]",
"url": "addyosmani.com"
"url": "https://addyosmani.com"
},
"bin": "cli.js",
"engines": {
"node": ">=6"
},
"scripts": {
"test": "mocha"
"test": "xo && mocha",
"coverage": "nyc --reporter=html --reporter=text mocha"
},
"files": [
"cli.js",
@@ -50,6 +51,7 @@
"chai": "^4.2.0",
"mocha": "^6.0.2",
"rewire": "^4.0.1",
"nyc": "^14.1.1",
"xo": "^0.24.0"
},
"xo": {
17 changes: 17 additions & 0 deletions test/output.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-env mocha */
const {expect} = require('chai');
const rewire = require('rewire');

const outputWired = rewire('./../lib/output.js');
const getThreshold = outputWired.__get__('getThreshold');

describe('getThreshold method', () => {
it('should return "70" if no valid value is passed', () => {
expect(getThreshold('string')).to.equal(70);
expect(getThreshold(false)).to.equal(70);
expect(getThreshold(101)).to.equal(70);
});
it('should return the passed threshold value if correct', () => {
expect(getThreshold(80)).to.equal(80);
});
});