@joystick.js/test-canary 0.0.0-canary.81 → 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 +1 -1
- package/package.json +1 -1
- package/src/test.js +4 -5
package/dist/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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
package/src/test.js
CHANGED
|
@@ -1,15 +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
|
-
this.users = this.users.bind(this);
|
|
8
|
-
|
|
9
8
|
test.serial.after.always(() => {
|
|
10
9
|
// NOTE: Nuke users who were created as part of the test run to avoid
|
|
11
10
|
// data collisions in other tests/suites.
|
|
12
|
-
console.log('CLEANUP USERS',
|
|
11
|
+
console.log('CLEANUP USERS', users);
|
|
13
12
|
});
|
|
14
13
|
}
|
|
15
14
|
|
|
@@ -25,7 +24,7 @@ class Test {
|
|
|
25
24
|
body: JSON.stringify(userToSignup)
|
|
26
25
|
});
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
users.push(user);
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
|