Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 2289ac9

Browse files
committed
Merge pull request #100 from ipfs/tests/refactor
just a bit of cleanup
2 parents cd6797d + 4b9e954 commit 2289ac9

File tree

85 files changed

+66
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+66
-58
lines changed

karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ module.exports = function (config) {
88

99
files: [
1010
nodeForgePath,
11-
'tests/test-core/browser.js'
11+
'test/core-tests/browser.js'
1212
],
1313

1414
preprocessors: {
15-
'tests/test-core/*': ['webpack']
15+
'test/core-tests/*': ['webpack']
1616
},
1717

1818
webpack: {

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
"main": "src/core/index.js",
99
"scripts": {
1010
"lint": "standard --verbose | snazzy",
11-
"coverage": "istanbul cover --print both -- _mocha tests/test-core/index.js",
12-
"coverage:http-api": "istanbul cover --print both -- _mocha tests/test-http-api/index.js",
11+
"coverage": "istanbul cover --print both -- _mocha test/core-tests/index.js",
12+
"coverage:http-api": "istanbul cover --print both -- _mocha test/http-api-tests/index.js",
1313
"test": "npm run test:node && npm run test:browser",
1414
"test:node": "npm run test:node:core && npm run test:node:http-api && npm run test:node:cli",
1515
"test:node:teamcity": "npm run test:node:core:teamcity && npm run test:node:http-api:teamcity && npm run test:node:cli:teamcity",
16-
"test:node:cli:teamcity": "mocha --reporter mocha-teamcity-reporter tests/test-cli/index.js",
17-
"test:node:core:teamcity": "mocha --reporter mocha-teamcity-reporter tests/test-core/index.js",
18-
"test:node:http-api:teamcity": "mocha --reporter mocha-teamcity-reporter tests/test-http-api/index.js",
19-
"test:node:cli": "mocha tests/test-cli/index.js",
20-
"test:node:core": "mocha tests/test-core/index.js",
21-
"test:node:http-api": "mocha tests/test-http-api/index.js",
16+
"test:node:cli:teamcity": "mocha --reporter mocha-teamcity-reporter test/cli-tests/index.js",
17+
"test:node:core:teamcity": "mocha --reporter mocha-teamcity-reporter test/core-tests/index.js",
18+
"test:node:http-api:teamcity": "mocha --reporter mocha-teamcity-reporter test/http-api-tests/index.js",
19+
"test:node:cli": "mocha test/cli-tests/index.js",
20+
"test:node:core": "mocha test/core-tests/index.js",
21+
"test:node:http-api": "mocha test/http-api-tests/index.js",
2222
"test:browser": "karma start karma.conf.js",
2323
"test:browser:teamcity": "karma start --reporters teamcity --colors false karma.conf.js",
24-
"test:core": "mocha tests/test-core/index.js",
25-
"test:cli": "mocha tests/test-cli/index.js"
24+
"test:core": "mocha test/core-tests/index.js",
25+
"test:cli": "mocha test/cli-tests/index.js"
2626
},
2727
"pre-commit": [
2828
"lint",

src/core/init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = (repo, opts, callback) => {
1010
opts.bits = opts.bits || 2048
1111

1212
// Pre-set config values.
13-
var config = require('../../default-config.json')
13+
var config = require('../init-files/default-config.json')
1414

1515
// Verify repo does not yet exist (or that 'force' is provided).
1616
repo.exists((err, res) => {
@@ -65,7 +65,7 @@ module.exports = (repo, opts, callback) => {
6565
const blocks = new IpfsBlocks(repo)
6666
const dag = new IpfsDagService(blocks)
6767

68-
const initDocsPath = path.join(__dirname, '../../init-doc')
68+
const initDocsPath = path.join(__dirname, '../init-files/init-docs')
6969

7070
importer.import(initDocsPath, dag, {
7171
recursive: true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)