These are chat archives for systemjs/systemjs

20th
Dec 2015
Sebastien Dubois
@dsebastien
Dec 20 2015 08:19
Hey there
@aaronroberson what are you trying to accomplish with babel & SystemJS? In-browser transpilation?
Lex Robinson
@Lexicality
Dec 20 2015 11:46
@aaronroberson I recently switched our codebase over to using JSPM from just storing .js files in a js/lib folder and the biggest sticking point was getting tests to work. I found it very frictionless. However, we were already using the SystemJS Builder, so the actual build process didn't change much.
Peter Uithoven
@peteruithoven
Dec 20 2015 14:09
@Lexicality Probably because of this Mocha issue? mochajs/mocha#956 It's one of the reasons I'm trying Tape.
Lex Robinson
@Lexicality
Dec 20 2015 19:51
@peteruithoven It was because the mocha/babel combo in our ES6 tests used Node's require rather than SystemJS's. My solution was... Interesting, but functional.
-/*eslint-env mocha */
+/*eslint-env mocha, node */
 /*eslint-disable new-cap */
 import _ from 'lodash';
 import { expect } from 'chai';
+import System from 'systemjs';

-import decimal from './decimal';
-import { Odds } from '../odds';
+var Odds;
+var decimal;
+
+before(() => Promise.all([
+    System.import('./decimal', module.id),
+    System.import('../odds', module.id)
+]).then(([_decimal, odds]) => {
+    decimal = _decimal;
+    ({ Odds } = odds);
+}));
(I see gitter doesn't do github markdown)