@joystick.js/test-canary 0.0.0-canary.74 → 0.0.0-canary.76
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 +5 -4
package/dist/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"ava";let
|
|
1
|
+
import r from"ava";let t=[];r.serial.after.always(()=>{console.log("CLEANUP USERS",t)});class a{constructor(){}signup(e=[]){t.push(...e)}login(e={}){}accounts(){return{signup:this.signup,login:this.login}}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="",l=null){return r.serial(e,l)}}var u=new a;export{u as default};
|
package/package.json
CHANGED
package/src/test.js
CHANGED
|
@@ -3,8 +3,8 @@ import test from 'ava';
|
|
|
3
3
|
let users = [];
|
|
4
4
|
|
|
5
5
|
// NOTE: Internal cleaup to avoid confusing tests.
|
|
6
|
-
test.after.always(() => {
|
|
7
|
-
console.log('CLEANUP USERS');
|
|
6
|
+
test.serial.after.always(() => {
|
|
7
|
+
console.log('CLEANUP USERS', users);
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
class Test {
|
|
@@ -12,11 +12,12 @@ class Test {
|
|
|
12
12
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
signup(
|
|
15
|
+
signup(usersToSignup = []) {
|
|
16
|
+
users.push(...usersToSignup);
|
|
16
17
|
// TODO: As users are created in DB, push them into an array here in the test.
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
login(
|
|
20
|
+
login(user = {}) {
|
|
20
21
|
// TODO: When logging in, expect that node will return an object with a joystickLoginToken,
|
|
21
22
|
// joystickTokenExpiresAt, and joystickSession "cookie." These should be made accessible
|
|
22
23
|
// to the individual test so they can be passed in when running tests.
|