-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
705e64a
commit 30f2b8c
Showing
12 changed files
with
202 additions
and
29 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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,7 @@ | ||
{ pkgs ? import <nixpkgs> { }, nixt }: | ||
|
||
nixt.mkSuites { | ||
"Valid Tests" = { | ||
"always passes" = true; | ||
}; | ||
} |
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,45 @@ | ||
import "reflect-metadata"; | ||
|
||
import { Container } from "inversify"; | ||
import { IApp, IArgParser } from "./interfaces.js"; | ||
import { bindings } from "./bindings.js"; | ||
|
||
describe("App", () => { | ||
let container: Container; | ||
let sut: IApp; | ||
|
||
beforeAll(() => { | ||
const mockArgParser: IArgParser = { | ||
run: () => { | ||
const args = { | ||
paths: ["."], | ||
watch: false, | ||
verbose: [false, false], | ||
list: false, | ||
recurse: false, | ||
debug: false, | ||
help: false | ||
}; | ||
|
||
return args; | ||
} | ||
}; | ||
|
||
container = new Container; | ||
container.loadAsync(bindings); | ||
container.unbind(IArgParser); | ||
container.bind(IArgParser).toConstantValue(mockArgParser) | ||
sut = container.get(IApp); | ||
}) | ||
|
||
beforeEach(() => { | ||
container.snapshot(); | ||
}) | ||
|
||
it("is defined", () => { | ||
expect(sut).toBeDefined(); | ||
}) | ||
|
||
it.todo("returns non-zero exit code on fail") | ||
it.todo("returns non-zero exit code on import err") | ||
}) |
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,27 @@ | ||
import "reflect-metadata"; | ||
|
||
import { Container } from "inversify"; | ||
import { bindings } from "../../bindings.js"; | ||
import { IArgParser } from "../../interfaces.js"; | ||
|
||
describe("ArgParser", () => { | ||
let container: Container; | ||
let sut: IArgParser; | ||
|
||
beforeAll(() => { | ||
container = new Container; | ||
container.loadAsync(bindings); | ||
sut = container.get(IArgParser); | ||
}) | ||
|
||
beforeEach(() => { | ||
container.snapshot(); | ||
}) | ||
|
||
it("is defined", () => { | ||
expect(sut).toBeDefined(); | ||
}) | ||
|
||
it.todo("returns sensible defaults"); | ||
it.todo("returns correct structure"); | ||
}) |
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,24 @@ | ||
import "reflect-metadata"; | ||
|
||
import { Container } from "inversify"; | ||
import { bindings } from "../../bindings.js"; | ||
import { IRenderService } from "../../interfaces.js"; | ||
|
||
describe("RenderService", () => { | ||
let container: Container; | ||
let sut: IRenderService; | ||
|
||
beforeAll(() => { | ||
container = new Container; | ||
container.loadAsync(bindings); | ||
sut = container.get(IRenderService); | ||
}) | ||
|
||
beforeEach(() => { | ||
container.snapshot(); | ||
}) | ||
|
||
it("is defined", () => { | ||
expect(sut).toBeDefined(); | ||
}) | ||
}) |
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
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
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,27 @@ | ||
import "reflect-metadata"; | ||
|
||
import { Container } from "inversify"; | ||
import { bindings } from "../../bindings.js"; | ||
import { ITestFinder } from "../../interfaces.js"; | ||
|
||
describe("ItFinder", () => { | ||
let container: Container; | ||
let sut: ITestFinder; | ||
|
||
beforeAll(() => { | ||
container = new Container; | ||
container.loadAsync(bindings); | ||
sut = container.get(ITestFinder); | ||
}) | ||
|
||
beforeEach(() => { | ||
container.snapshot(); | ||
}) | ||
|
||
it("is defined", () => { | ||
expect(sut).toBeDefined(); | ||
}) | ||
|
||
it.todo("returns correct structure"); | ||
it.todo("sets importError values"); | ||
}) |
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
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,26 @@ | ||
import "reflect-metadata"; | ||
|
||
import { Container } from "inversify"; | ||
import { bindings } from "../../bindings.js"; | ||
import { ITestRunner } from "../../interfaces.js"; | ||
|
||
describe("TestRunner", () => { | ||
let container: Container; | ||
let sut: ITestRunner; | ||
|
||
beforeAll(() => { | ||
container = new Container; | ||
container.loadAsync(bindings); | ||
sut = container.get(ITestRunner); | ||
}) | ||
|
||
beforeEach(() => { | ||
container.snapshot(); | ||
}) | ||
|
||
it("is defined", () => { | ||
expect(sut).toBeDefined(); | ||
}) | ||
|
||
it.todo("handles failed tests"); | ||
}) |
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