From bb33cd0f23d566c0d87fcb57e42bd611761cc106 Mon Sep 17 00:00:00 2001 From: MURAKAMI Masahiko Date: Mon, 11 Jul 2022 22:59:50 +0900 Subject: [PATCH] docs: update test template in DEVELOPER.md (#9192) change to use DataSource instead of Connection --- DEVELOPER.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DEVELOPER.md b/DEVELOPER.md index 7acd0d406..1fa2560cf 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -103,21 +103,21 @@ Most tests will benefit from using this template as a starting point: ```ts import "reflect-metadata"; import { createTestingConnections, closeTestingConnections, reloadTestingDatabases } from "../../utils/test-utils"; -import { Connection } from "../../../src/connection/Connection"; +import { DataSource } from "../../../src/data-source/DataSource" import { expect } from "chai"; describe("github issues > # ", () => { - let connections: Connection[]; - before(async () => connections = await createTestingConnections({ + let dataSources: DataSource[]; + before(async () => dataSources = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], schemaCreate: true, dropSchema: true, })); - beforeEach(() => reloadTestingDatabases(connections)); - after(() => closeTestingConnections(connections)); + beforeEach(() => reloadTestingDatabases(dataSources)); + after(() => closeTestingConnections(dataSources)); - it("should ", () => Promise.all(connections.map(async connection => { + it("should ", () => Promise.all(dataSources.map(async dataSource => { // tests go here