Skip to content

Commit

Permalink
Fix jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VenelinBakalov committed Jul 5, 2024
1 parent 668259c commit b8d5852
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extension/src/__tests__/memento.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ describe("ScopedMemento", () => {

const keys = globalState.keys()
expect(keys).toBeDefined()
expect(keys).toIncludeAllMembers(["number", "string", "boolean", "object", "null"])
expect(keys).toMatchObject(["number", "string", "boolean", "object", "null"])
})
})

Expand Down
2 changes: 1 addition & 1 deletion packages/node/vrdt-common/src/__tests__/maven.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("Maven", () => {
it("Can read pom.xml modules", () => {
const actionsPom = new PomFile(ACTIONS_POM_PATH)
expect(actionsPom.isBase).toBe(false)
expect(actionsPom.modules).toBeEmpty()
expect(actionsPom.modules).toHaveLength(0)

const basePom = new PomFile(BASE_POM_PATH)
expect(basePom.isBase).toBe(true)
Expand Down
2 changes: 2 additions & 0 deletions packages/node/vrdt-common/src/__tests__/utility.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ describe("utility", () => {

const error = new Error("error")
error.stack = "stack trace"
// @ts-ignore

Check failure on line 81 in packages/node/vrdt-common/src/__tests__/utility.spec.ts

View workflow job for this annotation

GitHub Actions / Build and Release

Do not use "@ts-ignore" because it alters compilation errors
logger[level]("message:", error)
formattedMessage = `[2019-03-31T12:13:14.000Z ${level.toUpperCase()} - TestLog] message: stack trace`
expect(logChannel[level]).toHaveBeenCalledWith(formattedMessage)

error.stack = undefined
// @ts-ignore

Check failure on line 87 in packages/node/vrdt-common/src/__tests__/utility.spec.ts

View workflow job for this annotation

GitHub Actions / Build and Release

Do not use "@ts-ignore" because it alters compilation errors
logger[level]("message:", error)
formattedMessage = `[2019-03-31T12:13:14.000Z ${level.toUpperCase()} - TestLog] message: error`
expect(logChannel[level]).toHaveBeenCalledWith(formattedMessage)
Expand Down

0 comments on commit b8d5852

Please sign in to comment.