This repository was archived by the owner on Oct 9, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 "version" : " 0.0.11" ,
44 "registry" : " npm" ,
55 "jspmPackage" : true ,
6+ "scripts" : {
7+ "build" : " ./build.sh" ,
8+ "clear" : " rm -rf build-babel/node_modules build-babel/jspm_packages regenerator-runtime.js systemjs-babel-node.js systemjs-babel-browser.js" ,
9+ "prepublish" : " npm run build" ,
10+ "preversion" : " npm run test" ,
11+ "test" : " node test/index.js"
12+ },
613 "main" : " plugin-babel.js" ,
714 "map" : {
815 "systemjs-babel-build" : {
1825 },
1926 "files" : [
2027 " plugin-babel.js" ,
21- " babel-helpers" ,
22- " babel-helpers.js" ,
23- " regenerator-runtime.js" ,
24- " systemjs-babel-browser.js" ,
28+ " babel-helpers" ,
29+ " babel-helpers.js" ,
30+ " regenerator-runtime.js" ,
31+ " systemjs-babel-browser.js" ,
2532 " systemjs-babel-node.js"
26- ]
33+ ],
34+ "devDependencies" : {
35+ "browser-run" : " ^3.2.0" ,
36+ "systemjs" : " ^0.19.29" ,
37+ "tape" : " ^4.5.1"
38+ }
2739}
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ var test = require ( 'tape' ) ;
4+ var SystemJS = require ( 'systemjs' ) ;
5+
6+ test ( 'systemjs-plugin-babel' , function ( t ) {
7+ t . plan ( 1 ) ;
8+
9+ // given
10+ System . config ( {
11+ map : {
12+ 'plugin-babel' : './plugin-babel.js' ,
13+ 'systemjs-babel-build' : './systemjs-babel-browser.js'
14+ } ,
15+ transpiler : 'plugin-babel'
16+ } ) ;
17+
18+ // when
19+ System . import ( 'test/testing-code.js' )
20+
21+ // then
22+ . then ( function ( m ) {
23+ return m . p ( ) . then ( function ( message ) {
24+ t . equal ( message , 'Rocks :)' ) ;
25+ } ) ;
26+ } )
27+ . then ( t . end , t . end ) ;
28+ } ) ;
Original file line number Diff line number Diff line change 1+ export async function p ( ) {
2+ return await new Promise ( function ( resolve , reject ) {
3+ setTimeout ( function ( ) {
4+ resolve ( 'Rocks :)' ) ;
5+ } , 0 ) ;
6+ } ) ;
7+ }
You can’t perform that action at this time.
0 commit comments