Skip to content

Commit

Permalink
fix(tests): update CI node versions and fix tests (#63)
Browse files Browse the repository at this point in the history
* chore(travis-CI): add node v8 to CI and remove v4

* chore(travis-CI): add node v6 and v8 to CI and remove v4

* fix(tests): inrease of timeout and remove of assertion error

* fix(package-lock.json): remove of package-lock.json file
  • Loading branch information
Babanila committed Jul 19, 2018
1 parent 3567e64 commit e7ffda6
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ tmp
coverage
package
.idea
config.js
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: node_js
node_js:
- '4'
- '6'
- '8'
before_script:
- npm install -g grunt-cli
- gem install cucumber aruba
Expand Down
15 changes: 15 additions & 0 deletions create_config.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
#!/bin/bash

cat > "config.js" << EOF
/* SPHERE.IO credentials */
exports.config = {
client_id: "${SPHERE_CLIENT_ID}",
client_secret: "${SPHERE_CLIENT_SECRET}",
project_key: "${SPHERE_PROJECT_KEY}"
}
exports.logConfig = {
levelStream: 'warn'
}
exports.logentries_token = "${LOGENTRIES_TOKEN}"
EOF

cat > "${HOME}/.sphere-project-credentials" << EOF
${SPHERE_PROJECT_KEY}:${SPHERE_CLIENT_ID}:${SPHERE_CLIENT_SECRET}
EOF
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"main": "main.js",
"engines": {
"node": ">= 4"
"node": ">= 6.0.0"
},
"scripts": {
"test": "grunt coverage",
Expand Down
1 change: 1 addition & 0 deletions src/spec/integration/cleanup.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Helper = require '../helper/helper'
projectKey = process.env.SPHERE_PROJECT_KEY || "producttype-json-generator-tests"

describe 'Project cleanup', ->
this.timeout 15000
sphereClient = null

console.log "Removing productTypes from project", projectKey
Expand Down
3 changes: 2 additions & 1 deletion src/spec/integration/product-type-importer.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ testProductType = {
}

describe 'ProductTypeImporter', ->
this.timeout 30000
importer = null
sphereClient = null

Expand Down Expand Up @@ -106,7 +107,7 @@ describe 'ProductTypeImporter', ->
.then ->
done "Importer wrong product type"
.catch (err) ->
expect(err.toString()).to.equal "TypeError: Cannot read property 'name' of undefined"
expect(err.toString()).to.equal '''Error: Validation error on productType "product-type-key" - should have required property \'name\''''
sphereClient.productTypes.fetch()
.then (res) ->
expect(res.body.results.length).to.equal 0
Expand Down

0 comments on commit e7ffda6

Please sign in to comment.