@joystick.js/test-canary 0.0.0-canary.89 → 0.0.0-canary.90

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 o from"node-fetch";let a=[];t.serial.after.always(async()=>{for(let s=0;s<a?.length;s+=1){const e=a[s];await(void 0).deleteUser(e?._id||e?.user_id)}});class i{constructor(){}async signupUser(e=[]){for(let r=0;r<e?.length;r+=1){const n=e[r],l=await o(`http://localhost:${process.env.PORT}/api/_accounts/signup`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(c=>c.json());a.push(l)}}deleteUser(e=""){return o(`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 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="",r=null){return t.serial(e,r)}}var p=new i;export{p as default};
1
+ import t from"ava";import o from"node-fetch";let a=[];t.serial.after.always(async()=>{for(let s=0;s<a?.length;s+=1){const e=a[s];await(void 0).deleteUser(e?._id||e?.user_id)}});class i{constructor(){}async signupUser(e=[]){for(let r=0;r<e?.length;r+=1){const n=e[r],l=await o(`http://localhost:${process.env.PORT}/api/_test/accounts/signup`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(c=>c.json());a.push(l)}}deleteUser(e=""){return o(`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 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="",r=null){return t.serial(e,r)}}var p=new i;export{p 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.89",
4
+ "version": "0.0.0-canary.90",
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
@@ -20,7 +20,7 @@ class Test {
20
20
  async signupUser(usersToSignup = []) {
21
21
  for (let i = 0; i < usersToSignup?.length; i += 1) {
22
22
  const userToSignup = usersToSignup[i];
23
- const user = await fetch(`http://localhost:${process.env.PORT}/api/_accounts/signup`, {
23
+ const user = await fetch(`http://localhost:${process.env.PORT}/api/_test/accounts/signup`, {
24
24
  method: 'POST',
25
25
  mode: "cors",
26
26
  headers: {