im using webpack, angular 2, karma 0.13, jasmine 2.4.1
i have no reference to weakmap in my application. could not resolve with latest version of phantomjs
***> START:
ts-loader: Using typescript@2.2.2 and C:\\tsconfig.json 26 04 2017 12:48:25.002:INFO [karma]: Karma v0.13.22 server started at http://localhost:9999/ 26 04 2017 12:48:25.033:INFO [launcher]: Starting browser PhantomJS 26 04 2017 12:48:27.939:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: Connected on socket 6_yGicfWc30o_UC2AAAA with id 19438296 PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR ReferenceError: Can't find variable: WeakMap at C:/src/tests.entry.ts:9 PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR ReferenceError: Can't find variable: WeakMap at C:/src/tests.entry.ts:9***
PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR ReferenceError: Can't find variable: WeakMap at C:/src/tests.entry.ts:9 PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR ReferenceError: Can't find variable: WeakMap at C:/src/tests.entry.ts:9
In my case I'm using a package which makes use of weakmap. According to this issue on phantom.js (https://github.com/ariya/phantomjs/issues/13652), Phantomjs is not currently keeping up with webkit core.
Recommendations are to select another headless browser or use babel-polyfill.