Skip to content

Instantly share code, notes, and snippets.

@tbranyen
Last active August 29, 2015 14:05
Show Gist options
  • Save tbranyen/e5335b0a77c8c22d7045 to your computer and use it in GitHub Desktop.
Save tbranyen/e5335b0a77c8c22d7045 to your computer and use it in GitHub Desktop.
describe('Storage', function() {
var Storage;
before(function() {
return System.import('./storage').then(function(module) {
Storage = module;
});
});
it('is an object', function() {
assert.equal(typeof Storage, 'object');
});
});
@jugglinmike
Copy link

 describe('Storage', function() {
   var Storage;

   before(function() {
-    return System.import('./storage');
+    return System.import('./storage').then(function() {
+      Storage = System.get('./storage');
+    });
   });
- 
-  before(function() {
-    Storage = System.get('./storage');
-  });

   it('is an object', function() {
     assert.equal(typeof Storage, 'object');
   });
 });

@tbranyen
Copy link
Author

tbranyen commented Sep 1, 2014

The only change I made was removing the get call as well since the resolved value of System.import is the module.

@jugglinmike
Copy link

Even better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment