Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(internals): rename getVersion to getEngineVersion (#14054)
- Loading branch information
Showing
5 changed files
with
15 additions
and
18 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
14 changes: 7 additions & 7 deletions
14
...ests__/engine-commands/getVersion.test.ts → .../engine-commands/getEngineVersion.test.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,32 +1,32 @@ | ||
import { enginesVersion, getCliQueryEngineBinaryType } from '@prisma/engines' | ||
|
||
import { BinaryType, getVersion } from '../..' | ||
import { BinaryType, getEngineVersion } from '../..' | ||
|
||
const testIf = (condition: boolean) => (condition ? test : test.skip) | ||
const useNodeAPI = getCliQueryEngineBinaryType() === BinaryType.libqueryEngine | ||
|
||
describe('getVersion', () => { | ||
describe('getEngineVersion', () => { | ||
test('Introspection Engine', async () => { | ||
const introspectionEngineVersion = await getVersion(undefined, BinaryType.introspectionEngine) | ||
const introspectionEngineVersion = await getEngineVersion(undefined, BinaryType.introspectionEngine) | ||
expect(introspectionEngineVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
|
||
test('Migration Engine', async () => { | ||
const migrationEngineVersion = await getVersion(undefined, BinaryType.migrationEngine) | ||
const migrationEngineVersion = await getEngineVersion(undefined, BinaryType.migrationEngine) | ||
expect(migrationEngineVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
|
||
test('Prisma Fmt', async () => { | ||
const prismaFmtVersion = await getVersion(undefined, BinaryType.prismaFmt) | ||
const prismaFmtVersion = await getEngineVersion(undefined, BinaryType.prismaFmt) | ||
expect(prismaFmtVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
|
||
testIf(!useNodeAPI)('Query Engine', async () => { | ||
const queryEngineVersion = await getVersion(undefined, BinaryType.queryEngine) | ||
const queryEngineVersion = await getEngineVersion(undefined, BinaryType.queryEngine) | ||
expect(queryEngineVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
testIf(useNodeAPI)('Query Engine (Node-API)', async () => { | ||
const libqueryEngineVersion = await getVersion(undefined, BinaryType.libqueryEngine) | ||
const libqueryEngineVersion = await getEngineVersion(undefined, BinaryType.libqueryEngine) | ||
expect(libqueryEngineVersion.split(' ')[1]).toMatch(enginesVersion) | ||
}) | ||
}) |
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