Skip to content

Commit

Permalink
Tests, linting and build with dignified.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Apr 8, 2016
1 parent 63fd8f8 commit 1562a3f
Show file tree
Hide file tree
Showing 39 changed files with 14 additions and 72 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ build
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

dist
lib
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ before_install:
- npm i -g npm
# Workaround for a permissions issue with Travis virtual machine images
script:
- npm run lint
- npm test

before_script:
Expand Down
48 changes: 0 additions & 48 deletions karma.conf.js

This file was deleted.

31 changes: 9 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"description": "IPFS Repo implementation",
"main": "src/index.js",
"scripts": {
"test": "npm run test:node && npm run test:browser",
"test:node": "mocha tests/node-tests.js",
"test:browser": "karma start karma.conf.js",
"coverage": "istanbul cover --print both -- _mocha tests/node-tests.js",
"lint": "standard"
"test": "dignified-test",
"test:node": "dignified-test node",
"test:browser": "dignified-test browser",
"build": "dignified-build",
"coverage": "istanbul cover --print both -- _mocha test/node.js",
"lint": "dignified-lint",
"release": "dignified-release"
},
"repository": {
"type": "git",
Expand All @@ -24,34 +26,19 @@
"homepage": "https://github.com/ipfs/js-ipfs-repo",
"devDependencies": {
"async": "^1.5.2",
"babel-core": "^6.7.2",
"babel-loader": "^6.2.4",
"babel-polyfill": "^6.7.2",
"babel-preset-es2015": "^6.6.0",
"bl": "^1.1.2",
"bs58": "^3.0.0",
"buffer-loader": "^0.0.1",
"chai": "^3.5.0",
"dignified.js": "github:dignifiedquire/dignified.js",
"fs-blob-store": "^5.2.1",
"idb-plus-blob-store": "^1.0.0",
"istanbul": "^0.4.2",
"karma": "^0.13.22",
"karma-chrome-launcher": "^0.2.2",
"karma-cli": "^0.1.2",
"karma-firefox-launcher": "^0.1.7",
"karma-mocha": "^0.2.2",
"karma-phantomjs-launcher": "^1.0.0",
"karma-spec-reporter": "0.0.26",
"karma-webpack": "^1.7.0",
"local-storage-blob-store": "0.0.3",
"lodash": "^4.6.1",
"mocha": "^2.4.5",
"ncp": "^2.0.0",
"phantomjs-prebuilt": "^2.1.6",
"pre-commit": "^1.1.2",
"rimraf": "^2.5.2",
"standard": "^6.0.8",
"webpack": "github:diasdavid/webpack#webpack-1"
"rimraf": "^2.5.2"
},
"dependencies": {
"bl": "^1.1.2",
Expand Down
1 change: 0 additions & 1 deletion tests/browser-tests.js → test/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

'use strict'

require('babel-polyfill')
const async = require('async')
const store = require('idb-plus-blob-store')
const tests = require('./repo-test')
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/repo-test.js → test/repo-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const fs = require('fs')
const isNode = !global.window

const fileA = isNode
? fs.readFileSync(process.cwd() + '/tests/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data')
? fs.readFileSync(process.cwd() + '/test/test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data')
: require('buffer!./test-repo/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data')

module.exports = function (repo) {
Expand Down
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.
File renamed without changes.
File renamed without changes.

0 comments on commit 1562a3f

Please sign in to comment.