jest-zone-patch
Advanced tools
Comparing version
16
index.js
@@ -6,4 +6,6 @@ /** | ||
if (Zone === undefined) throw new Error('Missing: Zone (zone.js)'); | ||
if (jest === undefined) | ||
if (Zone === undefined) { | ||
throw new Error('Missing: Zone (zone.js)'); | ||
} | ||
if (jest === undefined) { | ||
throw new Error( | ||
@@ -14,4 +16,6 @@ 'Missing: jest.\n' + | ||
); | ||
if (jest['__zone_patch__'] === true) | ||
} | ||
if (jest['__zone_patch__'] === true) { | ||
throw new Error("'jest' has already been patched with 'Zone'."); | ||
} | ||
@@ -22,6 +26,8 @@ jest['__zone_patch__'] = true; | ||
if (SyncTestZoneSpec === undefined) | ||
if (SyncTestZoneSpec === undefined) { | ||
throw new Error('Missing: SyncTestZoneSpec (zone.js/dist/sync-test)'); | ||
if (ProxyZoneSpec === undefined) | ||
} | ||
if (ProxyZoneSpec === undefined) { | ||
throw new Error('Missing: ProxyZoneSpec (zone.js/dist/proxy.js)'); | ||
} | ||
@@ -28,0 +34,0 @@ const env = global; |
{ | ||
"name": "jest-zone-patch", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Enables Jest functions to be run within Zone.js context", | ||
@@ -8,3 +8,6 @@ "main": "index.js", | ||
"author": "MichaÅ PierzchaÅa <thymikee@gmail.com>", | ||
"license": "BSD-3" | ||
"license": "BSD-3", | ||
"peerDependencies": { | ||
"zone.js": "^0.7.5" | ||
} | ||
} |
5167
1.47%75
8.7%1
Infinity%