mirror of
https://github.com/kremalicious/astro-redirect-from.git
synced 2024-12-22 01:13:23 +01:00
bump vitest to v1.0, nested test fix
This commit is contained in:
parent
187a020464
commit
d41701a586
564
package-lock.json
generated
564
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@ -26,24 +26,24 @@
|
||||
"./dist"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.8.8",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
||||
"@vitest/coverage-v8": "^0.34.6",
|
||||
"@types/node": "^20.10.4",
|
||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||
"@vitest/coverage-v8": "^1.0.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint": "^8.55.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.0.1",
|
||||
"husky": "^8.0.0",
|
||||
"husky": "^8.0.3",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.0.3",
|
||||
"release-it": "^17.0.0",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^5.0.7",
|
||||
"vitest": "^0.34.6"
|
||||
"prettier": "^3.1.1",
|
||||
"release-it": "^17.0.1",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.0.8",
|
||||
"vitest": "^1.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"astro": ">= 3",
|
||||
"globby": "^13.2.2",
|
||||
"globby": "^14.0.0",
|
||||
"gray-matter": "^4.0.3"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -42,23 +42,23 @@ describe('createRedirect', () => {
|
||||
'/old-url-1': '/new-url',
|
||||
'/old-url-2': '/new-url'
|
||||
})
|
||||
})
|
||||
|
||||
it('should prepend slash everywhere', () => {
|
||||
const initialRedirects: Record<string, string> = {}
|
||||
const redirectFrom = ['old-url-1']
|
||||
let postSlug = '/new-url'
|
||||
it('should prepend slash everywhere', () => {
|
||||
const initialRedirects: Record<string, string> = {}
|
||||
const redirectFrom = ['old-url-1']
|
||||
let postSlug = '/new-url'
|
||||
|
||||
let result = createRedirect(initialRedirects, redirectFrom, postSlug)
|
||||
let result = createRedirect(initialRedirects, redirectFrom, postSlug)
|
||||
|
||||
expect(result).toStrictEqual({
|
||||
'/old-url-1': '/new-url'
|
||||
})
|
||||
expect(result).toStrictEqual({
|
||||
'/old-url-1': '/new-url'
|
||||
})
|
||||
|
||||
postSlug = 'new-url'
|
||||
result = createRedirect(initialRedirects, redirectFrom, postSlug)
|
||||
expect(result).toStrictEqual({
|
||||
'/old-url-1': '/new-url'
|
||||
})
|
||||
postSlug = 'new-url'
|
||||
result = createRedirect(initialRedirects, redirectFrom, postSlug)
|
||||
expect(result).toStrictEqual({
|
||||
'/old-url-1': '/new-url'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user