-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make functional tests pass with deno (#7)
* Ported functional tests (`test/functional/**/*.ts`) to deno * Some problems still remain. * #13 * #14 * Some test codes related to `CockroachDriver` and `PostgresDriver` are temporarily commented out.
- Loading branch information
Showing
818 changed files
with
7,655 additions
and
6,006 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
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
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 |
---|---|---|
|
@@ -3,11 +3,21 @@ import "https://unpkg.com/[email protected]/mocha.js"; | |
mocha.setup({ ui: 'bdd', reporter: 'spec' }); | ||
|
||
export function runTests(): void { | ||
mocha.run(); | ||
mocha.run(onCompleted); | ||
} | ||
|
||
export function runIfMain(meta: ImportMeta): void { | ||
if (meta.main) { | ||
mocha.run(); | ||
mocha.run(onCompleted); | ||
} | ||
} | ||
|
||
mocha.timeout(60000); | ||
|
||
function onCompleted(failures: number): void { | ||
if (failures > 0) { | ||
Deno.exit(1); | ||
} else { | ||
Deno.exit(0); | ||
} | ||
} |
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
12 changes: 6 additions & 6 deletions
12
test/functional/cascades/cascade-insert-from-both-sides/entity/PostDetails.ts
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,17 +1,17 @@ | ||
import {Entity} from "../../../../../src/decorator/entity/Entity"; | ||
import {PrimaryColumn} from "../../../../../src/decorator/columns/PrimaryColumn"; | ||
import {Post} from "./Post"; | ||
import {OneToOne} from "../../../../../src/decorator/relations/OneToOne"; | ||
import {Entity} from "../../../../../src/decorator/entity/Entity.ts"; | ||
import {PrimaryColumn} from "../../../../../src/decorator/columns/PrimaryColumn.ts"; | ||
import {Post} from "./Post.ts"; | ||
import {OneToOne} from "../../../../../src/decorator/relations/OneToOne.ts"; | ||
|
||
@Entity() | ||
export class PostDetails { | ||
|
||
@PrimaryColumn() | ||
@PrimaryColumn({ type: String }) | ||
keyword: string; | ||
|
||
@OneToOne(type => Post, post => post.details, { | ||
cascade: ["insert"] | ||
}) | ||
post: Post; | ||
|
||
} | ||
} |
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
10 changes: 5 additions & 5 deletions
10
test/functional/columns/embedded-columns/entity/Counters.ts
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
4 changes: 2 additions & 2 deletions
4
test/functional/columns/embedded-columns/entity/Information.ts
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,7 +1,7 @@ | ||
import { Column } from "../../../../../src/decorator/columns/Column"; | ||
import { Column } from "../../../../../src/decorator/columns/Column.ts"; | ||
|
||
export class Information { | ||
|
||
@Column({ name: "descr" }) | ||
@Column({ name: "descr", type: String }) | ||
description: string; | ||
} |
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
10 changes: 5 additions & 5 deletions
10
test/functional/columns/embedded-columns/entity/SimpleCounters.ts
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
12 changes: 6 additions & 6 deletions
12
test/functional/columns/embedded-columns/entity/SimplePost.ts
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
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
Oops, something went wrong.