How to use the insist.equal function in insist

To help you get started, we’ve selected a few insist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / fxa-auth-server / test / remote / session_tests.js View on Github external
}).then((status) => {
            assert.equal(status.verified, false, 'email status now reports unverified, because mustVerify=true')
            // The reauth should have triggerd a verification email.
            return server.mailbox.waitForCode(email)
          }).then((code) => {
            return client.verifyEmail(code)
github mozilla / fxa-auth-server / test / remote / password_change_tests.js View on Github external
function (status) {
            // Verify correct status
            assert.equal(status.verified, false, 'account is unverified')
            assert.equal(status.emailVerified, true, 'account email is verified')
            assert.equal(status.sessionVerified, false, 'account session is unverified')
          }
        )
github raineorshine / shackles / test / spec.js View on Github external
it('should have a chainable tap function that passes the value to a function', function () {

			var chain = shackles()

			var myval = null

			var result = chain(10)
				.tap(function(value) {
					myval = value * 2
				})
				.value()

			assert.equal(result, 10)
			assert.equal(myval, 20)
		})
github raineorshine / shackles / test / spec.js View on Github external
it('should override the boxed value with the value that the tap callback returns', function () {

			var chain = shackles()

			var result = chain(10)
				.tap(function(value) {
					return value/2
				})
				.value()

			assert.equal(result, 5)
		})
	})
github raineorshine / shackles / test / spec.js View on Github external
it('should override the boxed value with any scalar properties that are called as chained functions', function () {

		var chain = shackles({
			num: 10
		})

		var result = chain('dummy')
			.num()
			.value()

		assert.equal(result, 10)
	})
github mozilla / fxa-oauth-server / test / api.js View on Github external
}).then(function(res) {
            assert.equal(res.statusCode, 200);
            assert(res.result.expires_in);
            assert(res.result.access_token);
            assert.equal(res.result.refresh_token, undefined);
          });
        });
github mozilla / fxa-auth-server / test / api.js View on Github external
}).then(function(res) {
            assert.equal(res.statusCode, 200);
            assert(res.result.expires_in);
            assert(res.result.access_token);
            assert.equal(res.result.refresh_token, undefined);
          });
        });
github mozilla / fxa-oauth-server / test / api.js View on Github external
}).then(function(res) {
          assert.equal(res.statusCode, 200);
          assertSecurityHeaders(res);
          assert.equal(res.result.user, USERID);
          assert.equal(res.result.client_id, clientId);
          assert.equal(res.result.scope[0], 'profile');
          assert.equal(res.result.email, undefined);
          assert.equal(res.result.profile_changed_at, undefined);
        });
      });
github mozilla / fxa-auth-server / test / api.js View on Github external
}).then(function(res) {
          assert.equal(res.statusCode, 200);
          assertSecurityHeaders(res);
          assert.equal(res.result.user, USERID);
          assert.equal(res.result.client_id, clientId);
          assert.equal(res.result.scope[0], 'profile');
          assert.equal(res.result.email, VEMAIL);
        });
      });
github mozilla / fxa-oauth-server / test / api.js View on Github external
return newToken({ scope: 'openid' }, { verifierResponse }).then(res => {
          assert.equal(res.statusCode, 200);
          assertSecurityHeaders(res);
          assert(res.result.id_token);
          const jwt = decodeJWT(res.result.id_token);
          const claims = jwt.claims;

          assert.equal(claims.sub, USERID);
          assert.equal(claims.aud, clientId);
          assert.equal(claims.iss, config.get('openid.issuer'));
          assert.equal(claims.amr, undefined);
          assert.equal(claims.acr, ACR);
          assert.equal(claims['fxa-aal'], AAL);
        });
      });

insist

Drop-in replacement of assert with a better message.

MPL-2.0
Latest version published 7 years ago

Package Health Score

42 / 100
Full package analysis

Popular insist functions