@joystick.js/test-canary 0.0.0-canary.82 → 0.0.0-canary.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/test.js CHANGED
@@ -1 +1 @@
1
- import t from"ava";import a from"node-fetch";class o{constructor(){this.users=[],this.signup.bind(this),this.login.bind(this),t.serial.after.always(()=>{console.log("CLEANUP USERS",this.users)})}async signup(e=[]){for(let s=0;s<e?.length;s+=1){const r=e[s],n=await a(`http://localhost:${process.env.PORT}/api/_accounts/signup`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});this.users.push(n)}}login(e={}){}before(e=null){return t.serial.before(e)}beforeEach(e=null){return t.beforeEach(e)}after(e=null){return t.after.always(e)}afterEach(e=null){return t.afterEach.always(e)}that(e="",s=null){return t.serial(e,s)}}var h=new o;export{h as default};
1
+ import r from"ava";import l from"node-fetch";let a=[];class n{constructor(){r.serial.after.always(()=>{console.log("CLEANUP USERS",a)})}async signup(e=[]){for(let t=0;t<e?.length;t+=1){const o=e[t],s=await l(`http://localhost:${process.env.PORT}/api/_accounts/signup`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});a.push(s)}}login(e={}){}before(e=null){return r.serial.before(e)}beforeEach(e=null){return r.beforeEach(e)}after(e=null){return r.after.always(e)}afterEach(e=null){return r.afterEach.always(e)}that(e="",t=null){return r.serial(e,t)}}var i=new n;export{i as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@joystick.js/test-canary",
3
3
  "type": "module",
4
- "version": "0.0.0-canary.82",
4
+ "version": "0.0.0-canary.83",
5
5
  "description": "Isomorphic testing framework for the Joystick JavaScript framework.",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
package/src/test.js CHANGED
@@ -1,17 +1,14 @@
1
1
  import test from 'ava';
2
2
  import fetch from 'node-fetch';
3
3
 
4
+ let users = [];
5
+
4
6
  class Test {
5
7
  constructor() {
6
- this.users = [];
7
-
8
- this.signup.bind(this);
9
- this.login.bind(this);
10
-
11
8
  test.serial.after.always(() => {
12
9
  // NOTE: Nuke users who were created as part of the test run to avoid
13
10
  // data collisions in other tests/suites.
14
- console.log('CLEANUP USERS', this.users);
11
+ console.log('CLEANUP USERS', users);
15
12
  });
16
13
  }
17
14
 
@@ -27,7 +24,7 @@ class Test {
27
24
  body: JSON.stringify(userToSignup)
28
25
  });
29
26
 
30
- this.users.push(user);
27
+ users.push(user);
31
28
  }
32
29
  }
33
30