Skip to content

Commit 1d52210

Browse files
authored
test: move got tests into got folder (#2542)
1 parent 3fc5cc3 commit 1d52210

37 files changed

+58
-58
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"lint:js": "eslint --cache --cache-location './.cache/eslint' '**/*.js'",
6060
"lint:js:fix": "eslint --cache --cache-location './.cache/eslint' --fix '**/*.js'",
6161
"lint:ts": "dtslint --expectOnly types",
62-
"test": "nyc --reporter=lcov --reporter=text mocha tests",
62+
"test": "nyc --reporter=lcov --reporter=text mocha --recursive tests",
6363
"test:coverage": "open coverage/lcov-report/index.html"
6464
},
6565
"license": "MIT",
File renamed without changes.

tests/test_allow_unmocked.js renamed to tests/got/test_allow_unmocked.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
const { expect } = require('chai')
44
const http = require('http')
55
const sinon = require('sinon')
6-
const nock = require('..')
6+
const nock = require('../..')
77

88
const got = require('./got_client')
9-
const { startHttpServer } = require('./servers')
9+
const { startHttpServer } = require('../servers')
1010

1111
describe('allowUnmocked option', () => {
1212
it('with allowUnmocked, mocked request still works', async () => {

tests/test_allow_unmocked_https.js renamed to tests/got/test_allow_unmocked_https.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict'
22

33
const { expect } = require('chai')
4-
const nock = require('..')
4+
const nock = require('../..')
55

66
const got = require('./got_client')
7-
const servers = require('./servers')
7+
const servers = require('../servers')
88

99
describe('allowUnmocked option (https)', () => {
1010
it('Nock with allowUnmocked and an url match', async () => {

tests/test_back_filters.js renamed to tests/got/test_back_filters.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const path = require('path')
66
const rimraf = require('rimraf')
77

88
const got = require('./got_client')
9-
const { startHttpServer } = require('./servers')
9+
const { startHttpServer } = require('../servers')
1010

11-
const nock = require('../')
11+
const nock = require('../..')
1212

1313
const nockBack = nock.back
1414
const originalMode = nockBack.currentMode

tests/test_basic_auth.js renamed to tests/got/test_basic_auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const { expect } = require('chai')
44
const assertRejects = require('assert-rejects')
5-
const nock = require('..')
5+
const nock = require('../..')
66
const got = require('./got_client')
77

88
describe('basic auth with username and password', () => {

tests/test_body_match.js renamed to tests/got/test_body_match.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const assertRejects = require('assert-rejects')
44
const { expect } = require('chai')
55
const FormData = require('form-data')
6-
const nock = require('../')
6+
const nock = require('../..')
77
const got = require('./got_client')
88

99
describe('`matchBody()`', () => {

tests/test_content_encoding.js renamed to tests/got/test_content_encoding.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const { expect } = require('chai')
44
const zlib = require('zlib')
5-
const nock = require('..')
5+
const nock = require('../..')
66
const got = require('./got_client')
77

88
describe('Content Encoding', () => {

tests/test_default_reply_headers.js renamed to tests/got/test_default_reply_headers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
const { expect } = require('chai')
4-
const nock = require('..')
4+
const nock = require('../..')
55
const got = require('./got_client')
66

77
describe('`defaultReplyHeaders()`', () => {

tests/test_define.js renamed to tests/got/test_define.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const http = require('http')
44
const { expect } = require('chai')
55
const assertRejects = require('assert-rejects')
6-
const nock = require('..')
6+
const nock = require('../..')
77
const got = require('./got_client')
88

99
describe('`define()`', () => {

0 commit comments

Comments
 (0)