karma-painless
Advanced tools
Comparing version 1.0.0 to 1.1.0
;(function (window) { | ||
var diff = require('variable-diff'); | ||
window.__PAINLESS__ = []; | ||
@@ -6,2 +7,13 @@ | ||
function onTestDone(test, groupName) { | ||
var log; | ||
if (test.error) { | ||
log = [test.error.message ? test.error.message : test.error]; | ||
if (test.error.actual && test.error.expected) { | ||
log.push(diff(test.error.expected, test.error.actual).text); | ||
} | ||
if (test.error.stack) { | ||
log.push(test.error.stack); | ||
} | ||
} | ||
karma.result({ | ||
@@ -14,3 +26,3 @@ id: '', | ||
time: test.time, | ||
log: ['some log'], | ||
log: log ? log : [], | ||
assertionErrors: [] | ||
@@ -17,0 +29,0 @@ }); |
@@ -8,3 +8,3 @@ var path = require('path') | ||
function initPainless(files) { | ||
files.unshift(createPattern(__dirname + '/adapter.js')); | ||
files.unshift(createPattern(__dirname + '/build/adapter.js')); | ||
} | ||
@@ -11,0 +11,0 @@ |
{ | ||
"name": "karma-painless", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Karma plugin for painless test library", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "node test.js", | ||
"build": "mkdir -p build && browserify adapter.js -o build/adapter.js", | ||
"prepublish": "npm run build" | ||
}, | ||
@@ -9,0 +11,0 @@ "repository": { |
@@ -6,3 +6,3 @@ var painless = require('painless'); | ||
test('sync 1', function() { | ||
assert(true); | ||
assert.deepEqual({ a: 'b' }, {a: 'c'}); | ||
}); | ||
@@ -9,0 +9,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
32199
123