-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing lodash in a test rather than console spew
- Loading branch information
adrianbw
committed
Jul 4, 2019
1 parent
b737bef
commit 78d6d76
Showing
3 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |