mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
tests(sqljs): fixed tests not failing when mocha fails
This commit is contained in:
parent
5c4f407cc8
commit
25ece465a6
@ -327,8 +327,6 @@ export class Gulpfile {
|
||||
*/
|
||||
@Task("coveragePost", ["coveragePre"])
|
||||
coveragePost() {
|
||||
//let error = false;
|
||||
|
||||
chai.should();
|
||||
chai.use(require("sinon-chai"));
|
||||
chai.use(require("chai-as-promised"));
|
||||
@ -339,12 +337,6 @@ export class Gulpfile {
|
||||
grep: !!args.grep ? new RegExp(args.grep) : undefined,
|
||||
timeout: 15000
|
||||
}))
|
||||
//.pipe(istanbul.writeReports())
|
||||
// .on("error", () => {
|
||||
// console.error("An error occured while running mocha");
|
||||
// error = true;
|
||||
// process.exit(1);
|
||||
// })
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
import {Column, Entity, PrimaryGeneratedColumn} from "../../../../src/index";
|
||||
|
||||
@Entity()
|
||||
export class User {
|
||||
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column()
|
||||
name: string;
|
||||
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
import "reflect-metadata";
|
||||
import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../utils/test-utils";
|
||||
import {Connection} from "../../../src/connection/Connection";
|
||||
import {expect} from "chai";
|
||||
|
||||
describe("failing", () => {
|
||||
|
||||
let connections: Connection[] = [];
|
||||
before(async () => connections = await createTestingConnections({
|
||||
entities: [__dirname + "/entity/*{.js,.ts}"],
|
||||
enabledDrivers: ["mysql"]
|
||||
}));
|
||||
beforeEach(() => reloadTestingDatabases(connections));
|
||||
after(() => closeTestingConnections(connections));
|
||||
|
||||
it("should fail", () => Promise.all(connections.map(async connection => {
|
||||
await connection.query("SELECT * FRO abcd");
|
||||
expect(true).to.be.true;
|
||||
})));
|
||||
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user