Skip to content

Commit

Permalink
Avoid http calls on tests (#76)
Browse files Browse the repository at this point in the history
Avoid http calls on tests
  • Loading branch information
Kikobeats committed May 21, 2019
2 parents 8570bf4 + 034807c commit 5e9c6df
Show file tree
Hide file tree
Showing 3 changed files with 1,305 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -93,6 +93,7 @@
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"ava": "latest",
"ava-nock": "latest",
"babel-eslint": "latest",
"conventional-github-releaser": "latest",
"finepack": "latest",
Expand Down Expand Up @@ -126,7 +127,7 @@
"release:github": "conventional-github-releaser -p angular",
"release:tags": "git push --follow-tags origin HEAD:master",
"start": "NODE_ENV=production node server.js",
"test": "NODE_ENV=test ava",
"test": "GITHUB_TOKEN=FAKE_GITHUB_TOKEN NODE_ENV=test ava",
"update": "ncu -u",
"update:check": "ncu -- --error-level 2"
},
Expand Down
5 changes: 3 additions & 2 deletions test/core/github/fetch-repo.js
@@ -1,9 +1,10 @@
'use strict'

const test = require('ava')

const { setupTests } = require('ava-nock')
const { fetchRepo } = require('../../../core/github')

setupTests()

test('infer master branch by default', async t => {
const { source } = await fetchRepo({ owner: 'CKGrafico', repo: 'Frontend-Boilerplates' })
t.is(source.ref, 'vue')
Expand Down

0 comments on commit 5e9c6df

Please sign in to comment.