diff --git a/.travis.yml b/.travis.yml index a9f810124..55a77ad33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,3 +38,7 @@ script: - node_modules/.bin/gulp test/node - node simple-server.js 2>&1> server.log& - node ./test/webdriver/test.sauce.js + - npm install jasmine@3.0.0 jasmine-core@3.0.0 + - npm run test:phantomjs-single + - node_modules/.bin/karma start karma-dist-sauce-jasmine3.conf.js --single-run + - node_modules/.bin/gulp test/node diff --git a/karma-dist-sauce-jasmine3.conf.js b/karma-dist-sauce-jasmine3.conf.js new file mode 100644 index 000000000..550d2ad94 --- /dev/null +++ b/karma-dist-sauce-jasmine3.conf.js @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +module.exports = function (config) { + require('./karma-dist-jasmine.conf.js')(config); + require('./sauce.conf')(config, ['SL_IOS9', 'SL_CHROME', 'SL_FIREFOX_54', 'SL_SAFARI8', 'SL_SAFARI9', 'SL_SAFARI10', 'SL_IOS8', 'SL_IOS9', 'SL_IOS10', 'SL_IE9', 'SL_IE10', 'SL_IE11', 'SL_MSEDGE15', 'SL_ANDROID4.4', 'SL_ANDROID5.1']) +}; diff --git a/lib/jasmine/jasmine.ts b/lib/jasmine/jasmine.ts index ddca40bcf..00d9810d9 100644 --- a/lib/jasmine/jasmine.ts +++ b/lib/jasmine/jasmine.ts @@ -9,23 +9,27 @@ 'use strict'; (() => { const __extends = function(d: any, b: any) { - for (const p in b) - if (b.hasOwnProperty(p)) d[p] = b[p]; + for (const p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new (__ as any)()); + d.prototype = + b === null + ? Object.create(b) + : ((__.prototype = b.prototype), new (__ as any)()); }; // Patch jasmine's describe/it/beforeEach/afterEach functions so test code always runs // in a testZone (ProxyZone). (See: angular/zone.js#91 & angular/angular#10503) if (!Zone) throw new Error('Missing: zone.js'); if (typeof jasmine == 'undefined') throw new Error('Missing: jasmine.js'); if ((jasmine as any)['__zone_patch__']) - throw new Error('\'jasmine\' has already been patched with \'Zone\'.'); + throw new Error(`'jasmine' has already been patched with 'Zone'.`); (jasmine as any)['__zone_patch__'] = true; - const SyncTestZoneSpec: {new (name: string): ZoneSpec} = (Zone as any)['SyncTestZoneSpec']; - const ProxyZoneSpec: {new (): ZoneSpec} = (Zone as any)['ProxyZoneSpec']; + const SyncTestZoneSpec: { new (name: string): ZoneSpec } = (Zone as any)[ + 'SyncTestZoneSpec' + ]; + const ProxyZoneSpec: { new (): ZoneSpec } = (Zone as any)['ProxyZoneSpec']; if (!SyncTestZoneSpec) throw new Error('Missing: SyncTestZoneSpec'); if (!ProxyZoneSpec) throw new Error('Missing: ProxyZoneSpec'); @@ -37,47 +41,49 @@ const symbol = Zone.__symbol__; - // This is the zone which will be used for running individual tests. - // It will be a proxy zone, so that the tests function can retroactively install - // different zones. - // Example: - // - In beforeEach() do childZone = Zone.current.fork(...); - // - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the - // zone outside of fakeAsync it will be able to escape the fakeAsync rules. - // - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add - // fakeAsync behavior to the childZone. - let testProxyZone: Zone = null; - let testProxyZoneSpec: ZoneSpec = null; - // Monkey patch all of the jasmine DSL so that each function runs in appropriate zone. const jasmineEnv: any = jasmine.getEnv(); - ['describe', 'xdescribe', 'fdescribe'].forEach((methodName) => { + ['describe', 'xdescribe', 'fdescribe'].forEach(methodName => { let originalJasmineFn: Function = jasmineEnv[methodName]; - jasmineEnv[methodName] = function(description: string, specDefinitions: Function) { - return originalJasmineFn.call(this, description, wrapDescribeInZone(specDefinitions)); + jasmineEnv[methodName] = function( + description: string, + specDefinitions: Function + ) { + return originalJasmineFn.call( + this, + description, + wrapDescribeInZone(specDefinitions) + ); }; }); - ['it', 'xit', 'fit'].forEach((methodName) => { + ['it', 'xit', 'fit'].forEach(methodName => { let originalJasmineFn: Function = jasmineEnv[methodName]; jasmineEnv[symbol(methodName)] = originalJasmineFn; jasmineEnv[methodName] = function( - description: string, specDefinitions: Function, timeout: number) { + description: string, + specDefinitions: Function, + timeout: number + ) { arguments[1] = wrapTestInZone(specDefinitions); return originalJasmineFn.apply(this, arguments); }; }); - ['beforeEach', 'afterEach'].forEach((methodName) => { + ['beforeEach', 'afterEach'].forEach(methodName => { let originalJasmineFn: Function = jasmineEnv[methodName]; jasmineEnv[symbol(methodName)] = originalJasmineFn; - jasmineEnv[methodName] = function(specDefinitions: Function, timeout: number) { + jasmineEnv[methodName] = function( + specDefinitions: Function, + timeout: number + ) { arguments[0] = wrapTestInZone(specDefinitions); return originalJasmineFn.apply(this, arguments); }; }); - const originalClockFn: Function = (jasmine as any)[symbol('clock')] = jasmine['clock']; + const originalClockFn: Function = ((jasmine as any)[symbol('clock')] = + jasmine['clock']); (jasmine as any)['clock'] = function() { const clock = originalClockFn.apply(this, arguments); - const originalTick = clock[symbol('tick')] = clock.tick; + const originalTick = (clock[symbol('tick')] = clock.tick); clock.tick = function() { const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec'); if (fakeAsyncZoneSpec) { @@ -85,17 +91,23 @@ } return originalTick.apply(this, arguments); }; - const originalMockDate = clock[symbol('mockDate')] = clock.mockDate; + const originalMockDate = (clock[symbol('mockDate')] = clock.mockDate); clock.mockDate = function() { const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec'); if (fakeAsyncZoneSpec) { const dateTime = arguments[0]; - return fakeAsyncZoneSpec.setCurrentRealTime.apply(fakeAsyncZoneSpec, dateTime && typeof dateTime.getTime === 'function' ? [dateTime.getTime()] : arguments); + return fakeAsyncZoneSpec.setCurrentRealTime.apply( + fakeAsyncZoneSpec, + dateTime && typeof dateTime.getTime === 'function' + ? [dateTime.getTime()] + : arguments + ); } return originalMockDate.apply(this, arguments); }; ['install', 'uninstall'].forEach(methodName => { - const originalClockFn: Function = clock[symbol(methodName)] = clock[methodName]; + const originalClockFn: Function = (clock[symbol(methodName)] = + clock[methodName]); clock[methodName] = function() { const FakeAsyncTestZoneSpec = (Zone as any)['FakeAsyncTestZoneSpec']; if (FakeAsyncTestZoneSpec) { @@ -114,12 +126,18 @@ */ function wrapDescribeInZone(describeBody: Function): Function { return function() { - return syncZone.run(describeBody, this, arguments as any as any[]); + return syncZone.run(describeBody, this, (arguments as any) as any[]); }; } - function runInTestZone(testBody: Function, done?: Function) { + function runInTestZone( + testBody: Function, + queueRunner: any, + done?: Function + ) { const isClockInstalled = !!(jasmine as any)[symbol('clockInstalled')]; + const testProxyZoneSpec = queueRunner.testProxyZoneSpec; + const testProxyZone = queueRunner.testProxyZone; let lastDelegate; if (isClockInstalled) { const FakeAsyncTestZoneSpec = (Zone as any)['FakeAsyncTestZoneSpec']; @@ -151,54 +169,100 @@ // The `done` callback is only passed through if the function expects at least one argument. // Note we have to make a function with correct number of arguments, otherwise jasmine will // think that all functions are sync or async. - return testBody && (testBody.length ? function(done: Function) { - runInTestZone(testBody, done); - } : function() { - runInTestZone(testBody); - }); + return ( + testBody && + (testBody.length + ? function(done: Function) { + return runInTestZone(testBody, this.queueRunner, done); + } + : function() { + return runInTestZone(testBody, this.queueRunner); + }) + ); } interface QueueRunner { execute(): void; } interface QueueRunnerAttrs { - queueableFns: {fn: Function}[]; + queueableFns: { fn: Function }[]; onComplete: () => void; clearStack: (fn: any) => void; onException: (error: any) => void; catchException: () => boolean; userContext: any; - timeout: {setTimeout: Function, clearTimeout: Function}; + timeout: { setTimeout: Function; clearTimeout: Function }; fail: () => void; } - const QueueRunner = (jasmine as any).QueueRunner as {new (attrs: QueueRunnerAttrs): QueueRunner}; + const QueueRunner = (jasmine as any).QueueRunner as { + new (attrs: QueueRunnerAttrs): QueueRunner; + }; (jasmine as any).QueueRunner = (function(_super) { __extends(ZoneQueueRunner, _super); - function ZoneQueueRunner(attrs: {onComplete: Function}) { - attrs.onComplete = ((fn) => () => { + function ZoneQueueRunner(attrs: { + onComplete: Function; + userContext?: any; + }) { + attrs.onComplete = (fn => () => { // All functions are done, clear the test zone. - testProxyZone = null; - testProxyZoneSpec = null; + this.testProxyZone = null; + this.testProxyZoneSpec = null; ambientZone.scheduleMicroTask('jasmine.onComplete', fn); })(attrs.onComplete); + // create a userContext to hold the queueRunner itself + // so we can access the testProxy in it/xit/beforeEach ... + if ((jasmine as any).UserContext) { + if (!attrs.userContext) { + attrs.userContext = new (jasmine as any).UserContext(); + } + attrs.userContext.queueRunner = this; + } else { + if (!attrs.userContext) { + attrs.userContext = {}; + } + attrs.userContext.queueRunner = this; + } _super.call(this, attrs); } ZoneQueueRunner.prototype.execute = function() { - if (Zone.current !== ambientZone) throw new Error('Unexpected Zone: ' + Zone.current.name); - testProxyZoneSpec = new ProxyZoneSpec(); - testProxyZone = ambientZone.fork(testProxyZoneSpec); + let zone: Zone = Zone.current; + let isChildOfAmbientZone = false; + while (zone) { + if (zone === ambientZone) { + isChildOfAmbientZone = true; + break; + } + zone = zone.parent; + } + + if (!isChildOfAmbientZone) + throw new Error('Unexpected Zone: ' + Zone.current.name); + + // This is the zone which will be used for running individual tests. + // It will be a proxy zone, so that the tests function can retroactively install + // different zones. + // Example: + // - In beforeEach() do childZone = Zone.current.fork(...); + // - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the + // zone outside of fakeAsync it will be able to escape the fakeAsync rules. + // - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add + // fakeAsync behavior to the childZone. + + this.testProxyZoneSpec = new ProxyZoneSpec(); + this.testProxyZone = ambientZone.fork(this.testProxyZoneSpec); if (!Zone.currentTask) { // if we are not running in a task then if someone would register a // element.addEventListener and then calling element.click() the // addEventListener callback would think that it is the top most task and would // drain the microtask queue on element.click() which would be incorrect. // For this reason we always force a task when running jasmine tests. - Zone.current.scheduleMicroTask( - 'jasmine.execute().forceTask', () => QueueRunner.prototype.execute.call(this)); + Zone.current.scheduleMicroTask('jasmine.execute().forceTask', () => + QueueRunner.prototype.execute.call(this) + ); } else { _super.prototype.execute.call(this); } }; return ZoneQueueRunner; - }(QueueRunner)); + })(QueueRunner); })(); diff --git a/package-lock.json b/package-lock.json index 47fd50988..bcdc7d6af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -91,6 +91,15 @@ "ansi-wrap": "0.1.0" } }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-regex": { "version": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", @@ -202,11 +211,6 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, - "array-differ": { - "version": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -342,11 +346,6 @@ "tweetnacl": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" } }, - "beeper": { - "version": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, "better-assert": { "version": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", @@ -636,6 +635,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, "colors": { "version": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", @@ -1499,32 +1504,6 @@ "void-elements": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz" } }, - "duplexer2": { - "version": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - }, - "dependencies": { - "isarray": { - "version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - } - } - } - }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -1732,6 +1711,12 @@ } } }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, "expand-braces": { "version": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz", "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=", @@ -2633,14 +2618,6 @@ } } }, - "glogg": { - "version": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", - "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", - "dev": true, - "requires": { - "sparkles": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" - } - }, "google-closure-compiler": { "version": "https://registry.npmjs.org/google-closure-compiler/-/google-closure-compiler-20170409.0.0.tgz", "integrity": "sha1-3Bvimp9+74YRNkUzsnG5+sdXyXA=", @@ -2743,7 +2720,7 @@ "archy": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "deprecated": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", - "gulp-util": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "gulp-util": "3.0.8", "interpret": "https://registry.npmjs.org/interpret/-/interpret-1.0.1.tgz", "liftoff": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", "minimist": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", @@ -2813,7 +2790,7 @@ "requires": { "clang-format": "https://registry.npmjs.org/clang-format/-/clang-format-1.0.46.tgz", "gulp-diff": "1.0.0", - "gulp-util": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "gulp-util": "3.0.8", "pkginfo": "0.3.1", "stream-combiner2": "1.1.1", "stream-equal": "0.1.6", @@ -2959,7 +2936,7 @@ "cli-color": "1.2.0", "diff": "2.2.3", "event-stream": "3.3.4", - "gulp-util": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "gulp-util": "3.0.8", "through2": "2.0.3" }, "dependencies": { @@ -3190,7 +3167,7 @@ "add-stream": "1.0.0", "concat-stream": "1.6.0", "conventional-changelog": "1.1.7", - "gulp-util": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "gulp-util": "3.0.8", "object-assign": "4.1.1", "through2": "2.0.3" }, @@ -3456,7 +3433,7 @@ "requires": { "async": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "byline": "https://registry.npmjs.org/byline/-/byline-4.2.2.tgz", - "gulp-util": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "gulp-util": "3.0.8", "lodash": "3.10.1", "node-version-compare": "https://registry.npmjs.org/node-version-compare/-/node-version-compare-1.0.1.tgz", "resolve": "1.4.0", @@ -3797,7 +3774,7 @@ "integrity": "sha1-m9P/T7wW1MvZq7CP94bbibVj6T0=", "dev": true, "requires": { - "gulp-util": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "gulp-util": "3.0.8", "map-stream": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", "through": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" } @@ -3809,7 +3786,7 @@ "requires": { "deap": "https://registry.npmjs.org/deap/-/deap-1.0.0.tgz", "fancy-log": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", - "gulp-util": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "gulp-util": "3.0.8", "isobject": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "through2": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "uglify-js": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.4.tgz", @@ -3841,118 +3818,442 @@ } }, "gulp-util": { - "version": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", "dev": true, "requires": { - "array-differ": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "array-uniq": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "beeper": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "dateformat": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", - "fancy-log": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", - "gulplog": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "has-gulplog": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "lodash._reescape": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "lodash._reevaluate": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "lodash._reinterpolate": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "lodash.template": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "minimist": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "multipipe": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "object-assign": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "replace-ext": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "through2": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "vinyl": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz" + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.2.0", + "fancy-log": "1.3.2", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" }, "dependencies": { "ansi-regex": { - "version": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "ansi-styles": { - "version": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, "chalk": { - "version": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "has-ansi": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "supports-color": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, + "clone": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", + "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, "dateformat": { - "version": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", - "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", "dev": true }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "fancy-log": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", + "dev": true, + "requires": { + "ansi-gray": "0.1.1", + "color-support": "1.1.3", + "time-stamp": "1.1.0" + } + }, + "glogg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "1.0.1" + } + }, "has-ansi": { - "version": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + "ansi-regex": "2.1.1" + } + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "3.0.1" } }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, "lodash.template": { - "version": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", "dev": true, "requires": { - "lodash._basecopy": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "lodash._basetostring": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "lodash._basevalues": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "lodash._isiterateecall": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "lodash._reinterpolate": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "lodash.escape": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "lodash.keys": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "lodash.restparam": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "lodash.templatesettings": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz" + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" } }, "lodash.templatesettings": { - "version": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", "dev": true, "requires": { - "lodash._reinterpolate": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "lodash.escape": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz" + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" } }, "object-assign": { - "version": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", "dev": true }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, "strip-ansi": { - "version": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + "ansi-regex": "2.1.1" } }, "supports-color": { - "version": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "1.0.3", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true } } }, - "gulplog": { - "version": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz" - } - }, "handlebars": { "version": "4.0.11", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", @@ -4102,14 +4403,6 @@ "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, - "has-gulplog": { - "version": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" - } - }, "has-own-property-x": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/has-own-property-x/-/has-own-property-x-3.1.1.tgz", @@ -4775,30 +5068,66 @@ } }, "jasmine": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.4.1.tgz", - "integrity": "sha1-kBbdpFMhPSesbUPcTqlzFaGJCF4=", + "version": "2.99.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.99.0.tgz", + "integrity": "sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc=", "dev": true, "requires": { "exit": "0.1.2", - "glob": "3.2.11", - "jasmine-core": "2.4.1" + "glob": "7.1.2", + "jasmine-core": "2.99.1" }, "dependencies": { - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", "inherits": "2.0.3", - "minimatch": "0.3.0" + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -4807,34 +5136,42 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "lru-cache": "2.7.3", - "sigmund": "1.0.1" + "brace-expansion": "1.1.11" } }, - "sigmund": { + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true } } }, "jasmine-core": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.4.1.tgz", - "integrity": "sha1-b4OrOg8WlRcizgfSBsdz1XzIOL4=", + "version": "2.99.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", + "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", "dev": true }, "jsbn": { @@ -5028,8 +5365,9 @@ "dev": true }, "karma-jasmine": { - "version": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-0.3.8.tgz", - "integrity": "sha1-W2RXeRrZuJqhc/B54+vhuMgFI2w=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-1.1.1.tgz", + "integrity": "sha1-b+hA51oRYAydkehLM8RY4cRqNSk=", "dev": true }, "karma-mocha": { @@ -5427,16 +5765,6 @@ "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", "dev": true }, - "lodash._basetostring": { - "version": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, "lodash._getnative": { "version": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", @@ -5447,39 +5775,11 @@ "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", "dev": true }, - "lodash._reescape": { - "version": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, "lodash.assignwith": { "version": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", "integrity": "sha1-EnqX8CrcQXUalU0ksN4X4QDgOOs=", "dev": true }, - "lodash.escape": { - "version": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" - } - }, "lodash.isarguments": { "version": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", @@ -5531,11 +5831,6 @@ "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", "dev": true }, - "lodash.restparam": { - "version": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, "lodash.template": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", @@ -6018,14 +6313,6 @@ "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", "dev": true }, - "multipipe": { - "version": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz" - } - }, "nan-x": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/nan-x/-/nan-x-1.0.0.tgz", @@ -6989,11 +7276,6 @@ "to-string-x": "1.4.2" } }, - "replace-ext": { - "version": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, "request": { "version": "https://registry.npmjs.org/request/-/request-2.55.0.tgz", "integrity": "sha1-11wc32eddrsQD5v/4f5VG1wk6T0=", @@ -7497,11 +7779,6 @@ } } }, - "sparkles": { - "version": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", - "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", - "dev": true - }, "spdx-correct": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", @@ -8997,16 +9274,6 @@ "extsprintf": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz" } }, - "vinyl": { - "version": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "clone-stats": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "replace-ext": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" - } - }, "vinyl-fs": { "version": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", diff --git a/package.json b/package.json index 1a3e65d9f..28ad61e49 100644 --- a/package.json +++ b/package.json @@ -75,12 +75,12 @@ "gulp-tslint": "^7.0.1", "gulp-uglify": "^1.2.0", "gulp-util": "^3.0.7", - "jasmine": "2.4.1", - "jasmine-core": "2.4.1", + "jasmine": "^2.9.1", + "jasmine-core": "^2.9.1", "karma": "^0.13.14", "karma-chrome-launcher": "^0.2.1", "karma-firefox-launcher": "^0.1.4", - "karma-jasmine": "^0.3.6", + "karma-jasmine": "^1.1.1", "karma-mocha": "^1.2.0", "karma-phantomjs-launcher": "^1.0.4", "karma-safari-launcher": "^0.1.1", diff --git a/test/browser/browser.spec.ts b/test/browser/browser.spec.ts index 6f312eafe..9b013d70c 100644 --- a/test/browser/browser.spec.ts +++ b/test/browser/browser.spec.ts @@ -14,6 +14,8 @@ import {getIEVersion, ifEnvSupports, ifEnvSupportsWithDone, isEdge} from '../tes import Spy = jasmine.Spy; declare const global: any; +const noop = function() {}; + function windowPrototype() { return !!(global['Window'] && global['Window'].prototype); } diff --git a/test/browser/requestAnimationFrame.spec.ts b/test/browser/requestAnimationFrame.spec.ts index 63a12540b..2df631e9d 100644 --- a/test/browser/requestAnimationFrame.spec.ts +++ b/test/browser/requestAnimationFrame.spec.ts @@ -10,43 +10,55 @@ import {ifEnvSupports} from '../test-util'; declare const window: any; describe('requestAnimationFrame', function() { - const functions = - ['requestAnimationFrame', 'webkitRequestAnimationFrame', 'mozRequestAnimationFrame']; + const functions = [ + 'requestAnimationFrame', + 'webkitRequestAnimationFrame', + 'mozRequestAnimationFrame' + ]; functions.forEach(function(fnName) { - describe(fnName, ifEnvSupports(fnName, function() { - const rAF = window[fnName]; - - it('should be tolerant of invalid arguments', function() { - // rAF throws an error on invalid arguments, so expect that. - expect(function() { - rAF(null); - }).toThrow(); - }); - - it('should bind to same zone when called recursively', function(done) { - const originalTimeout: number = (jasmine).DEFAULT_TIMEOUT_INTERVAL; - (jasmine).DEFAULT_TIMEOUT_INTERVAL = 10000; - Zone.current.fork({name: 'TestZone'}).run(() => { - let frames = 0; - let previousTimeStamp = 0; - - function frameCallback(timestamp: number) { - expect(timestamp).toMatch(/^[\d.]+$/); - // expect previous <= current - expect(previousTimeStamp).not.toBeGreaterThan(timestamp); - previousTimeStamp = timestamp; - - if (frames++ > 15) { - (jasmine).DEFAULT_TIMEOUT_INTERVAL = originalTimeout; - return done(); - } - rAF(frameCallback); - } - - rAF(frameCallback); - }); - }); - })); + describe( + fnName, + ifEnvSupports(fnName, function() { + const originalTimeout: number = (jasmine).DEFAULT_TIMEOUT_INTERVAL; + beforeEach(() => { + (jasmine).DEFAULT_TIMEOUT_INTERVAL = 10000; + }); + + afterEach(() => { + (jasmine).DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + }); + const rAF = window[fnName]; + + it('should be tolerant of invalid arguments', function() { + // rAF throws an error on invalid arguments, so expect that. + expect(function() { + rAF(null); + }).toThrow(); + }); + + it('should bind to same zone when called recursively', function(done) { + Zone.current.fork({ name: 'TestZone' }).run(() => { + let frames = 0; + let previousTimeStamp = 0; + + function frameCallback(timestamp: number) { + expect(timestamp).toMatch(/^[\d.]+$/); + // expect previous <= current + expect(previousTimeStamp).not.toBeGreaterThan(timestamp); + previousTimeStamp = timestamp; + + if (frames++ > 15) { + (jasmine).DEFAULT_TIMEOUT_INTERVAL = originalTimeout; + return done(); + } + rAF(frameCallback); + } + + rAF(frameCallback); + }); + }); + }) + ); }); }); diff --git a/test/common/Promise.spec.ts b/test/common/Promise.spec.ts index 11f74fe05..d6a803b72 100644 --- a/test/common/Promise.spec.ts +++ b/test/common/Promise.spec.ts @@ -527,7 +527,7 @@ describe( }); }); - it('should resolve if the Promise subclass resolves', function() { + function testPromiseSubClass(done?: Function) { const myPromise = new MyPromise(function(resolve: any, reject: Function) { resolve('foo'); }); @@ -538,7 +538,14 @@ describe( }) .then(function(result) { expect(result).toBe('foo'); + done && done(); }); + } + + it('should resolve if the Promise subclass resolves', jasmine ? function(done) { + testPromiseSubClass(done); + } : function() { + testPromiseSubClass(); }); }); diff --git a/test/rxjs/rxjs.fromEvent.spec.ts b/test/rxjs/rxjs.fromEvent.spec.ts index cbc2ba768..6020ee795 100644 --- a/test/rxjs/rxjs.fromEvent.spec.ts +++ b/test/rxjs/rxjs.fromEvent.spec.ts @@ -19,88 +19,103 @@ function isEventTarget() { describe('Observable.fromEvent', () => { let log: string[]; - const constructorZone1: Zone = Zone.current.fork({name: 'Constructor Zone1'}); - const subscriptionZone: Zone = Zone.current.fork({name: 'Subscription Zone'}); - const triggerZone: Zone = Zone.current.fork({name: 'Trigger Zone'}); + const constructorZone1: Zone = Zone.current.fork({ + name: 'Constructor Zone1' + }); + const subscriptionZone: Zone = Zone.current.fork({ + name: 'Subscription Zone' + }); + const triggerZone: Zone = Zone.current.fork({ name: 'Trigger Zone' }); let observable1: any; beforeEach(() => { log = []; }); - it('fromEvent EventTarget func callback should run in the correct zone', - ifEnvSupports(isEventTarget, () => { - observable1 = constructorZone1.run(() => { - return Rx.Observable.fromEvent(document, 'click'); - }); - - const clickEvent = document.createEvent('Event'); - clickEvent.initEvent('click', true, true); - - subscriptionZone.run(() => { - observable1.subscribe( - (result: any) => { - expect(Zone.current.name).toEqual(subscriptionZone.name); - log.push(result); - }, - () => { - fail('should not call error'); - }, - () => { - expect(Zone.current.name).toEqual(subscriptionZone.name); - log.push('completed'); - }); - }); - - triggerZone.run(() => { - document.dispatchEvent(clickEvent); - }); - - expect(log).toEqual([clickEvent]); - })); - - it('fromEventPattern EventTarget func callback should run in the correct zone', - ifEnvSupports(isEventTarget, () => { - observable1 = constructorZone1.run(() => { - const handler = function() { - log.push('handler'); - }; - return Rx.Observable.fromEventPattern( - () => { - expect(Zone.current.name).toEqual(constructorZone1.name); - document.addEventListener('click', handler); - log.push('addListener'); - }, - () => { - expect(Zone.current.name).toEqual(constructorZone1.name); - document.removeEventListener('click', handler); - log.push('removeListener'); - }); - }); - - const clickEvent = document.createEvent('Event'); - clickEvent.initEvent('click', true, true); - - const subscriper: any = subscriptionZone.run(() => { - return observable1.subscribe( - (result: any) => { - expect(Zone.current.name).toEqual(subscriptionZone.name); - log.push(result); - }, - () => { - fail('should not call error'); - }, - () => { - expect(Zone.current.name).toEqual(subscriptionZone.name); - log.push('completed'); - }); - }); - - triggerZone.run(() => { - document.dispatchEvent(clickEvent); - subscriper.complete(); - }); - - expect(log).toEqual(['addListener', clickEvent, 'handler', 'completed', 'removeListener']); - })); -}); \ No newline at end of file + it( + 'fromEvent EventTarget func callback should run in the correct zone', + ifEnvSupports(isEventTarget, () => { + observable1 = constructorZone1.run(() => { + return Rx.Observable.fromEvent(document, 'click'); + }); + + const clickEvent = document.createEvent('Event'); + clickEvent.initEvent('click', true, true); + + subscriptionZone.run(() => { + observable1.subscribe( + (result: any) => { + expect(Zone.current.name).toEqual(subscriptionZone.name); + log.push(result); + }, + () => { + fail('should not call error'); + }, + () => { + expect(Zone.current.name).toEqual(subscriptionZone.name); + log.push('completed'); + } + ); + }); + + triggerZone.run(() => { + document.dispatchEvent(clickEvent); + }); + + expect(log).toEqual([clickEvent]); + }) + ); + + it( + 'fromEventPattern EventTarget func callback should run in the correct zone', + ifEnvSupports(isEventTarget, () => { + const button = document.createElement('button'); + document.body.appendChild(button); + observable1 = constructorZone1.run(() => { + return Rx.Observable.fromEventPattern( + (handler: any) => { + expect(Zone.current.name).toEqual(constructorZone1.name); + button.addEventListener('click', handler); + log.push('addListener'); + }, + (handler: any) => { + expect(Zone.current.name).toEqual(constructorZone1.name); + button.removeEventListener('click', handler); + document.body.removeChild(button); + log.push('removeListener'); + } + ); + }); + + const clickEvent = document.createEvent('Event'); + clickEvent.initEvent('click', false, false); + + const subscriper: any = subscriptionZone.run(() => { + return observable1.subscribe( + (result: any) => { + expect(Zone.current.name).toEqual(subscriptionZone.name); + log.push(result); + }, + () => { + fail('should not call error'); + }, + () => { + expect(Zone.current.name).toEqual(subscriptionZone.name); + log.push('completed'); + } + ); + }); + + triggerZone.run(() => { + button.dispatchEvent(clickEvent); + subscriper.complete(); + }); + expect(log).toEqual([ + 'addListener', + clickEvent, + 'completed', + 'removeListener' + ]); + }) + ); +}); diff --git a/test/test-util.ts b/test/test-util.ts index d1ae6a14b..77907f522 100644 --- a/test/test-util.ts +++ b/test/test-util.ts @@ -51,10 +51,8 @@ function _runTest(test: any, block: Function, done: Function) { block(); } } else { + console.log('WARNING: skipping ' + message + ' tests (missing this API)'); done && done(); - it('should skip the test if the API does not exist', function() { - console.log('WARNING: skipping ' + message + ' tests (missing this API)'); - }); } }