@joystick.js/test-canary 0.0.0-canary.91 → 0.0.0-canary.93
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 +9 -9
package/dist/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"ava";import s from"node-fetch";let l=[];class c{constructor(){}async signupUser(e=[]){for(let t=0;t<e?.length;t+=1){const n=e[t],o=await s(`http://localhost:${process.env.PORT}/api/_test/accounts/signup`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(a=>a.json());l.push(o)}}deleteUser(e=""){return s(`http://localhost:${process.env.PORT}/api/_test/accounts`,{method:"DELETE",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId: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)}}const u=new c;var f=u;export{f as default};
|
package/package.json
CHANGED
package/src/test.js
CHANGED
|
@@ -65,14 +65,14 @@ class Test {
|
|
|
65
65
|
|
|
66
66
|
const testInstance = new Test();
|
|
67
67
|
|
|
68
|
-
test.serial.after.always(async () => {
|
|
69
|
-
// NOTE: Nuke users who were created as part of the test run to avoid
|
|
70
|
-
// data collisions in other tests/suites.
|
|
71
|
-
|
|
72
|
-
for (let i = 0; i < users?.length; i += 1) {
|
|
73
|
-
const user = users[i];
|
|
74
|
-
await testInstance.deleteUser(user?._id || user?.user_id);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
68
|
+
//test.serial.after.always(async () => {
|
|
69
|
+
// // NOTE: Nuke users who were created as part of the test run to avoid
|
|
70
|
+
// // data collisions in other tests/suites.
|
|
71
|
+
//
|
|
72
|
+
// for (let i = 0; i < users?.length; i += 1) {
|
|
73
|
+
// const user = users[i];
|
|
74
|
+
// await testInstance.deleteUser(user?._id || user?.user_id);
|
|
75
|
+
// }
|
|
76
|
+
//});
|
|
77
77
|
|
|
78
78
|
export default testInstance;
|