Skip to content

Commit 25f446f

Browse files
committed
tests: fix fileColonLine test
1 parent 8ffb84b commit 25f446f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/code-context-spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ describe('CodeContext', () => {
3131
describe('fileColonLine when lineNumber is set', () => {
3232
it('returns the full filepath when fullPath is truthy', () => {
3333
this.codeContext.lineNumber = 42;
34-
expect(this.codeContext.fileColonLine()).toMatch(testFilePath);
35-
expect(this.codeContext.fileColonLine(true)).toMatch(testFilePath);
34+
expect(this.codeContext.fileColonLine()).toEqual(`${testFilePath}:42`);
35+
expect(this.codeContext.fileColonLine(true)).toEqual(`${testFilePath}:42`);
3636
});
3737

3838
it('returns only the filename and line number when fullPath is falsy', () => {
3939
this.codeContext.lineNumber = 42;
40-
expect(this.codeContext.fileColonLine(false)).toMatch(testFile);
40+
expect(this.codeContext.fileColonLine(false)).toEqual(`${testFile}:42`);
4141
});
4242
});
4343

0 commit comments

Comments
 (0)