Skip to content

Commit 6bf3742

Browse files
committed
simplify
1 parent a1589b2 commit 6bf3742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/instanceof.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ test('ensure that instanceof works accross different installations of the fastif
8888
const { foo } = require('dep')
8989
9090
function normalizePath (path) {
91-
const normalizedPath = path.slice(path.indexOf("fastify-error-instanceof-test-") - 1)
91+
const normalizedPath = path.slice(path.indexOf("fastify-error-instanceof-test-"))
9292
return normalizedPath
9393
}
9494
@@ -135,7 +135,7 @@ test('ensure that instanceof works accross different installations of the fastif
135135
const { createError } = require('fastify-error')
136136
137137
function normalizePath (path) {
138-
const normalizedPath = path.slice(path.indexOf("fastify-error-instanceof-test-") - (process.platform === 'win32' ? 2 : 1))
138+
const normalizedPath = path.slice(path.indexOf("fastify-error-instanceof-test-"))
139139
return normalizedPath
140140
}
141141

0 commit comments

Comments
 (0)