tests(sqljs): fixed tests not failing when mocha fails

This commit is contained in:
Daniel Lang 2017-12-18 22:49:04 +01:00
parent 5c4f407cc8
commit 25ece465a6
3 changed files with 0 additions and 41 deletions

View File

@ -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);
// })
}
/**

View File

@ -1,12 +0,0 @@
import {Column, Entity, PrimaryGeneratedColumn} from "../../../../src/index";
@Entity()
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column()
name: string;
}

View File

@ -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;
})));
});