nuxt-security
nuxt-security copied to clipboard
Storage options tests are failing
Environment
- Operating System: Windows_NT
- Node Version: v22.14.0
- Nuxt Version: 3.11.2
- CLI Version: 3.11.1
- Nitro Version: 2.9.6
- Package Manager: [email protected]
- Builder: -
- User Config: -
- Runtime Modules: -
- Build Modules: -
Nuxt Security Version
v2.2.0
Default setup used?
Yes, the bug happens even if the security option is not customized
Security options
Reproduction
Applies to repo and not to published package
Description
After checking out the project and installing the dependencies, the tests for the storage options are failing.
Additional context
No response
Logs
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 2 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL test/storageOptions.test.ts > [nuxt-security] Storage options > should pass options to a custom driver
AssertionError: expected 500 to be 200 // Object.is equality
- Expected
+ Received
- 200
+ 500
❯ test/storageOptions.test.ts:20:25
18| expect(res1).toBeDefined()
19| expect(res1).toBeTruthy()
20| expect(res2.status).toBe(200)
| ^
21| expect(res2.statusText).toBe('OK')
22| })
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/2]⎯
FAIL test/storageOptions.test.ts > [nuxt-security] Storage options > should return 429 with the custom driver
AssertionError: expected 500 to be 429 // Object.is equality
- Expected
+ Received
- 429
+ 500
❯ test/storageOptions.test.ts:33:25
31| expect(res1).toBeDefined()
32| expect(res1).toBeTruthy()
33| expect(res5.status).toBe(429)
| ^
34| expect(res5.statusText).toBe('Too Many Requests')
35| })
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/2]⎯
Hi @TomHeinemeyer I believe tests pass in our CI/CD pipeline, would there be something different in your environment?
Hey @vejja, I just installed the project dependencies and ran the tests. Is there something else to be done?
I'm not sure. Tests pass locally on my end, I'm on MacOS but the rest of the config is same as you Maybe re-install ?