Skip to content

Commit

Permalink
Testing lodash in a test rather than console spew
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianbw committed Jul 4, 2019
1 parent b737bef commit 78d6d76
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
8 changes: 0 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
import { find } from "lodash";
import { test } from "./Utils";
const objs = [{ a: 1, b: 2 }, { a: 2, b: 1 }];
console.log("string");

const obA = find(objs, ["a", 1]);
console.log(JSON.stringify(obA, null, 2));

const str = test();
console.log(str);
5 changes: 2 additions & 3 deletions test/Utils.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { test } from "../src/Utils";
import assert from "assert";
import { assert } from "chai";

describe("Unit tests", () => {
it('string should be "success"', done => {
it('string should be "success"', () => {
const string = test();
console.log(string);
assert.equal(string, "success");
done();
});
});
11 changes: 11 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { find } from "lodash";
import { assert } from "chai";

const objs = [{ a: 1, b: 2 }, { a: 2, b: 1 }];

describe("Basic setup tests", () => {
it("Has sucessfully imported lodash", () => {
const obA = find(objs, ["a", 1]);
assert.isOk(obA);
});
});

0 comments on commit 78d6d76

Please sign in to comment.