$ node ./example/test-error.js
$ echo $? # prints 1, an error
1
$ node ./example/test-error.js | tap-summary
$ echo $? # prints 0, no error
0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dp = require('chi-datapackage'); | |
const {action, extendObservable, autorun, whyRun, observe} = require('mobx'); | |
const store = { | |
loadPackage: action(function loadPackage(data) { | |
dp.load(data) | |
.then(p => { | |
store.package = p; | |
}); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dp = require('chi-datapackage'); | |
const barracks = require('barracks'); | |
const store = barracks() | |
store.use({ | |
onError: (err, state, createSend) => { | |
console.error(`error: ${err}`); | |
}, | |
onAction: (data, state, name, caller, createSend) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dp = require('chi-datapackage'); | |
const barracks = require('barracks'); | |
const store = barracks() | |
store.use({ | |
onError: (err, state, createSend) => { | |
console.error(`error: ${err}`); | |
}, | |
onAction: (data, state, name, caller, createSend) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const barracks = require('barracks'); | |
const dp = require('chi-datapackage'); | |
const dpStore = barracks(); | |
dpStore.use({ | |
onError: (err, state, createSend) => { | |
console.error('Error:', err) | |
}, | |
onAction: (data, state, name, caller, createSend) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var universe = require('universe'); | |
var data = [{ | |
date: "2011-11-14T16:17:54Z", | |
quantity: 2, | |
total: 190, | |
tip: 100, | |
type: "tab", | |
productIDs: ["001"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var universe = require('universe'); | |
var data = [{ | |
date: "2011-11-14T16:17:54Z", | |
quantity: 2, | |
total: 190, | |
tip: 100, | |
type: "tab", | |
productIDs: ["001"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var fs = require('fs'); | |
var test = require('ava'); | |
var rimraf = require('rimraf'); | |
var globbyMaster = require('globby'); | |
var gs = require('glob-stream'); | |
var suite = require('chuhai'); | |
var globby = require('./'); | |
var BENCH_DIR = 'bench'; |