How to use the assert.deepStrictEqual function in assert

To help you get started, we’ve selected a few assert 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 googleapis / nodejs-spanner / test / transaction.ts View on Github external
it('should encode DML object statements', () => {
        const stub = sandbox.stub(transaction, 'request');
        transaction.batchUpdate(OBJ_STATEMENTS, assert.ifError);

        const {reqOpts} = stub.lastCall.args[0];
        assert.deepStrictEqual(reqOpts.statements, FORMATTED_STATEMENTS);
      });
github OpenXbox / xbox-smartglass-core-node / tests / packet_packer_simple.js View on Github external
it('should unpack a poweron packet', function(){
        var data_packet = fs.readFileSync('tests/data/packets/poweron')

        var poweron_request = Packer(data_packet)
        var message = poweron_request.unpack()

        assert.deepStrictEqual(message.type, 'simple')
        assert.deepStrictEqual(message.name, 'poweron')
        assert.deepStrictEqual(message.packet_decoded.liveid, 'FD00112233FFEE66')
    });
github gcanti / fp-ts / test / Ordering.ts View on Github external
it('eqOrdering', () => {
    assert.deepStrictEqual(eqOrdering.equals(-1, -1), true)
    assert.deepStrictEqual(eqOrdering.equals(-1, 0), false)
    assert.deepStrictEqual(eqOrdering.equals(-1, 1), false)
    assert.deepStrictEqual(eqOrdering.equals(0, -1), false)
    assert.deepStrictEqual(eqOrdering.equals(0, 0), true)
    assert.deepStrictEqual(eqOrdering.equals(0, 1), false)
    assert.deepStrictEqual(eqOrdering.equals(1, -1), false)
    assert.deepStrictEqual(eqOrdering.equals(1, 0), false)
    assert.deepStrictEqual(eqOrdering.equals(1, 1), true)
  })
github karma-runner / karma / test / client / stringify.spec.js View on Github external
it('should serialize proxied functions', function () {
      var defProxy = new Proxy(function (d, e, f) { return 'whatever' }, {})
      assert.deepStrictEqual(stringify(defProxy), 'function () { ... }')
    })
  }
github googleapis / nodejs-bigtable / system-test / read-rows.ts View on Github external
responses = test.responses;
        TABLE.maxRetries = test.max_retries;
        TABLE.createReadStream(test.createReadStream_options)
          .on('data', row => rowKeysRead[rowKeysRead.length - 1].push(row.id))
          .on('end', () => (endCalled = true))
          .on('error', err => (error = err));
        clock.runAll();

        if (test.error) {
          assert(!endCalled, `.on('end') should not have been invoked`);
          assert.strictEqual(error.code, test.error);
        } else {
          assert(endCalled, `.on('end') shoud have been invoked`);
          assert.ifError(error);
        }
        assert.deepStrictEqual(rowKeysRead, test.row_keys_read);
        assert.strictEqual(
          responses.length,
          0,
          'not all the responses were used'
        );
        assert.deepStrictEqual(requestedOptions, test.request_options);
      });
    });
github graalvm / graaljs / test / parallel / test-fs-access.js View on Github external
fs.access(__filename, fs.R_OK, common.mustCall(function(...args) {
  assert.deepStrictEqual(args, [null]);
}));
fs.promises.access(__filename, fs.R_OK)
github graalvm / graaljs / test / parallel / test-http2-multiheaders-raw.js View on Github external
'http',
    ':authority',
    `localhost:${server.address().port}`,
    ':method',
    'GET',
    'www-authenticate',
    'foo',
    'www-authenticate',
    'bar',
    'www-authenticate',
    'baz',
    'test',
    'foo, bar, baz'
  ];

  assert.deepStrictEqual(rawHeaders, expected);
  stream.respond(src);
  stream.end();
}));
github googleapis / nodejs-spanner / test / index.ts View on Github external
spanner.request = config => {
        const [projectId, name] = stub.lastCall.args;
        assert.strictEqual(projectId, spanner.projectId);
        assert.strictEqual(name, NAME);

        assert.deepStrictEqual(CONFIG, ORIGINAL_CONFIG);
        assert.strictEqual(config.client, 'InstanceAdminClient');
        assert.strictEqual(config.method, 'createInstance');

        const reqOpts = config.reqOpts;
        assert.deepStrictEqual(reqOpts, {
          parent: 'projects/' + spanner.projectId,
          instanceId: NAME,
          instance: extend(
            {
              name: PATH,
              displayName: NAME,
            },
            CONFIG
          ),
        });
        done();
github googleapis / nodejs-common / test / util.ts View on Github external
onAuthenticated(
            err: Error,
            authenticatedReqOpts: DecorateRequestOptions
          ) {
            assert.ifError(err);
            assert.deepStrictEqual(reqOpts, authenticatedReqOpts);
            done();
          },
        });
github googleapis / nodejs-translate / test / index.ts View on Github external
translate.request = (reqOpts: r.OptionsWithUri) => {
        assert.strictEqual(reqOpts.uri, '/languages');
        assert.deepStrictEqual(reqOpts.qs, {
          target: 'es',
        });
        done();
      };