karma-electron
Advanced tools
Comparing version 3.0.1 to 3.0.2
# karma-electron changelog | ||
3.0.2 - Added tests to verify we don't pollute non-Node environments | ||
3.0.1 - Fixed `xtend` dependency | ||
@@ -3,0 +5,0 @@ |
{ | ||
"name": "karma-electron", | ||
"description": "Karma launcher and preprocessor for Electron", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"homepage": "https://github.com/twolfson/karma-electron", | ||
@@ -32,2 +32,3 @@ "author": { | ||
"test-karma-failure": "node bin/verify-failure.js TEST_TYPE=FAILURE karma start test/integration-test/karma.conf.js --single-run", | ||
"test-karma-phantomjs": "cross-env TEST_TYPE=PHANTOMJS karma start test/integration-test/karma.conf.js --single-run --browsers PhantomJS", | ||
"test-karma-single-run": "karma start test/integration-test/karma.conf.js --single-run", | ||
@@ -53,3 +54,5 @@ "test-karma-uncaught-exception": "node bin/verify-failure.js TEST_TYPE=UNCAUGHT_EXCEPTION karma start test/integration-test/karma.conf.js --single-run", | ||
"karma-mocha": "~0.2.2", | ||
"karma-phantomjs-launcher": "~1.0.0", | ||
"mocha": "~1.11.0", | ||
"phantomjs-prebuilt": "~2.1.5", | ||
"twolfson-style": "~1.6.0" | ||
@@ -56,0 +59,0 @@ }, |
@@ -1,9 +0,11 @@ | ||
// Load in our dependencies | ||
var assert = require('assert'); | ||
// Start our tests | ||
// DEV: This doesn't use `assert` to allow this to run with other runners | ||
describe('An invalid assertion', function () { | ||
it('raises an error', function () { | ||
assert.strictEqual(1, 2); | ||
// jscs:disable disallowYodaConditions | ||
if (1 !== 2) { | ||
throw new Error('1 !== 2'); | ||
} | ||
// jscs:enable disallowYodaConditions | ||
}); | ||
}); |
@@ -6,6 +6,8 @@ // Karma configuration | ||
var karmaTest = 'karma-test.js'; | ||
var successTest = 'success-test.js'; | ||
var phantomJsTest = 'phantomjs-test.js'; | ||
var failureTest = 'failure-test.js'; | ||
var uncaughtExceptionTest = 'uncaught-exception-test.js'; | ||
var testFiles = ['*-test.js']; | ||
var excludeFiles = [failureTest, karmaTest, uncaughtExceptionTest]; | ||
var excludeFiles = [failureTest, karmaTest, phantomJsTest, uncaughtExceptionTest]; | ||
@@ -15,9 +17,14 @@ // If we are testing uncaught exceptions, then update our tests | ||
testFiles = [uncaughtExceptionTest]; | ||
excludeFiles = [failureTest, karmaTest]; | ||
excludeFiles = [failureTest, karmaTest, phantomJsTest]; | ||
} else if (process.env.TEST_TYPE === 'FAILURE') { | ||
testFiles = [failureTest]; | ||
excludeFiles = [karmaTest, uncaughtExceptionTest]; | ||
excludeFiles = [karmaTest, phantomJsTest, uncaughtExceptionTest]; | ||
} else if (process.env.TEST_TYPE === 'KARMA') { | ||
testFiles = [karmaTest]; | ||
excludeFiles = [failureTest, uncaughtExceptionTest]; | ||
testFiles = [karmaTest, phantomJsTest]; | ||
excludeFiles = [failureTest, phantomJsTest, uncaughtExceptionTest]; | ||
} else if (process.env.TEST_TYPE === 'PHANTOMJS') { | ||
testFiles = [successTest, phantomJsTest]; | ||
excludeFiles = []; | ||
} else if (process.env.TEST_TYPE) { | ||
throw new Error('Unrecognized test type "' + process.env.TEST_TYPE + '"'); | ||
} | ||
@@ -80,5 +87,6 @@ | ||
require('../../'), | ||
'karma-mocha' | ||
'karma-mocha', | ||
'karma-phantomjs-launcher' | ||
] | ||
}); | ||
}; |
// Load in our dependencies | ||
// DEV: By using an internal require here, we have verified that we support internal requires | ||
var assert = require('assert'); | ||
@@ -3,0 +4,0 @@ // DEV: By using a `node_modules` require here, we have verified that we support external requires |
@@ -1,9 +0,9 @@ | ||
// Load in our dependencies | ||
var assert = require('assert'); | ||
// Start our tests | ||
// DEV: This doesn't use `assert` to allow this to run with other runners | ||
describe('A basic operation', function () { | ||
it('asserts without errors', function () { | ||
assert.strictEqual(1 + 1, 2); | ||
if (1 + 1 !== 2) { | ||
throw new Error('1 + 1 !== 2'); | ||
} | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29784
23
442
13
7