Skip to content

Commit

Permalink
- update node versions for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
easilyBaffled committed Oct 2, 2018
1 parent 9dfd5ba commit 7f0f271
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- node
- stable
- lts
os:
- linux
- osx
Expand Down
14 changes: 13 additions & 1 deletion index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,25 @@ describe( 'match', () => {

test( 'getVectorLength', () => {
const getVectorLength = match( {
z: ( { x, y, z } ) => console.ident( Math.sqrt(x ** 2 + y ** 2 + z ** 2) ),
z: ( { x, y, z } ) => Math.sqrt(x ** 2 + y ** 2 + z ** 2),
y: ( { x, y } ) => Math.sqrt(x ** 2 + y ** 2 ),
_: vector => vector.length
} );

expect( getVectorLength({x: 1, y: 2, z: 3}) ).toBe( 3.7416573867739413 );
} );

const usersTypes = [
{ type: 'prod', privilege: true },
{ type: 'dev', privilege: true },
{ type: 'admin', privilege: true },
{ type: 'admin', privilege: false },
{ type: 'customer', privilege: true },
{ type: 'customer', privilege: false },
];



/*
test( 'Reducer Example', () => { // Taken from https://redux.js.org/basics/reducers#splitting-reducers
const todoReducer = ( state, { type, ...payload } ) => match( {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
},
"scripts": {
"test": "jest",
"test:6": "npx --package=node-bin@6 -- npm test",
"test:lts": "npx --package=node-bin@lts -- npm test",
"test:latest:": "npx --package=node-bin@latest -- npm test",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:report": "jest --coverage --coverageReporters=text-lcov | coveralls",
Expand Down

0 comments on commit 7f0f271

Please sign in to comment.