scaffolder-backend-module-gitlap: remove use of jest-date-mock
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -60,7 +60,6 @@
|
||||
"@backstage/backend-test-utils": "workspace:^",
|
||||
"@backstage/cli": "workspace:^",
|
||||
"@backstage/core-app-api": "workspace:^",
|
||||
"@backstage/plugin-scaffolder-node-test-utils": "workspace:^",
|
||||
"jest-date-mock": "^1.0.8"
|
||||
"@backstage/plugin-scaffolder-node-test-utils": "workspace:^"
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -18,7 +18,6 @@ import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-
|
||||
import { createGitlabIssueAction, IssueType } from './createGitlabIssueAction';
|
||||
import { ConfigReader } from '@backstage/core-app-api';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { advanceTo, clear } from 'jest-date-mock';
|
||||
|
||||
const mockGitlabClient = {
|
||||
Issues: {
|
||||
@@ -36,11 +35,13 @@ jest.mock('@gitbeaker/rest', () => ({
|
||||
describe('gitlab:issues:create', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
advanceTo(new Date(1988, 5, 3, 12, 0, 0)); // Set the desired date and time
|
||||
jest.useFakeTimers({
|
||||
now: new Date(1988, 5, 3, 12, 0, 0),
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
clear(); // Reset the date mock after each test
|
||||
jest.useRealTimers();
|
||||
});
|
||||
|
||||
const config = new ConfigReader({
|
||||
|
||||
@@ -8661,7 +8661,6 @@ __metadata:
|
||||
"@gitbeaker/core": ^35.8.0
|
||||
"@gitbeaker/node": ^35.8.0
|
||||
"@gitbeaker/rest": ^39.25.0
|
||||
jest-date-mock: ^1.0.8
|
||||
luxon: ^3.0.0
|
||||
yaml: ^2.0.0
|
||||
zod: ^3.22.4
|
||||
@@ -31916,13 +31915,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"jest-date-mock@npm:^1.0.8":
|
||||
version: 1.0.9
|
||||
resolution: "jest-date-mock@npm:1.0.9"
|
||||
checksum: 4f8c4914348c59c4b3951577276dfea6f714fa24d032a774225f41288da1a191cfe14f95e1ba59dcc0db8cf1c9f7d3a1581b18ade6fc7b63118b04166a127c0a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"jest-diff@npm:^29.2.0, jest-diff@npm:^29.7.0":
|
||||
version: 29.7.0
|
||||
resolution: "jest-diff@npm:29.7.0"
|
||||
|
||||
Reference in New Issue
Block a user