How to use the qunit.strictEqual function in qunit

To help you get started, we’ve selected a few qunit 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 thejohnfreeman / jfdoc / test / cases / file.js View on Github external
q.test("name", function () {
    q.expect(1);
    q.strictEqual(this.file.name, "file.js", "has file name");
  });
github thejohnfreeman / jfdoc / test / cases / namespace.js View on Github external
q.test("kind", function () {
    q.expect(2);
    q.strictEqual(this.Foo1.doclet.kind, "namespace",
      "Foo1 has namespace kind");
    q.strictEqual(this.Foo2.doclet.kind, "namespace",
      "Foo2 has namespace kind");
  });
github thejohnfreeman / jfdoc / test / cases / class.js View on Github external
q.test("kind", function () {
    q.expect(4);
    q.ok(this.Foo1.classDoclet, "Foo1 has a class doclet");
    q.strictEqual(this.Foo1.classDoclet.kind, "class", "Foo1 is a class");
    q.ok(this.Foo2.classDoclet, "Foo2 has a class doclet");
    q.strictEqual(this.Foo2.classDoclet.kind, "class", "Foo2 is a class");
  });
github thejohnfreeman / jfdoc / test / cases / namespace.js View on Github external
q.test("kind", function () {
    q.expect(2);
    q.strictEqual(this.Foo1.doclet.kind, "namespace",
      "Foo1 has namespace kind");
    q.strictEqual(this.Foo2.doclet.kind, "namespace",
      "Foo2 has namespace kind");
  });
github thejohnfreeman / jfdoc / test / cases / class.js View on Github external
q.test("kind", function () {
    q.expect(4);
    q.ok(this.Foo1.classDoclet, "Foo1 has a class doclet");
    q.strictEqual(this.Foo1.classDoclet.kind, "class", "Foo1 is a class");
    q.ok(this.Foo2.classDoclet, "Foo2 has a class doclet");
    q.strictEqual(this.Foo2.classDoclet.kind, "class", "Foo2 is a class");
  });
github thejohnfreeman / jfdoc / test / cases / namespace.js View on Github external
q.test("scope", function () {
    q.expect(6);
    q.ok(this.decls, "global decls");
    q.strictEqual(Object.keys(this.decls).length, 2, "number of namespaces");
    q.ok(this.Foo1, "Foo1 exists");
    q.ok(this.Foo1 instanceof jfdoc.Scope, "Foo1 is a scope");
    q.ok(this.Foo2, "Foo2 exists");
    q.ok(this.Foo2 instanceof jfdoc.Scope, "Foo2 is a scope");
  });
github thejohnfreeman / jfdoc / test / cases / constructor.js View on Github external
q.test("scope", function () {
    q.expect(5);
    q.strictEqual(Object.keys(this.decls).length, 2, "number of constructors");
    q.ok(this.Foo1, "Foo1 exists");
    q.ok(this.Foo1 instanceof jfdoc.Scope, "Foo1 is a scope");
    q.ok(this.Foo2, "Foo2 exists");
    q.ok(this.Foo2 instanceof jfdoc.Scope, "Foo2 is a scope");
  });
github thejohnfreeman / jfdoc / test / helpers.js View on Github external
exports.tagsEqual = function tagsEqual(tags, field, values) {
    q.strictEqual(tags.length, values.length, "number of tags");
    values.forEach(function (value, i) {
      q.strictEqual(tags[i][field], value, field + " of tag[" + i + "]");
    });
  };
github thejohnfreeman / jfdoc / test / helpers.js View on Github external
values.forEach(function (value, i) {
      q.strictEqual(tags[i][field], value, field + " of tag[" + i + "]");
    });
  };
github thejohnfreeman / jfdoc / test / helpers.js View on Github external
exports.stringEqual = function stringEqual(actual, expected) {
    q.strictEqual(actual, expected, "matches without trimming");
    q.strictEqual(actual.trim(), expected, "matches with trimming");
  };