-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove workarounds for
util
in non-node environments (#359)
* Always use util.inspect.custom, rather than conditionally. * Always use custom inspect. * remove pointless custom inspect from memstore * only use inspect symbol in cookie * Add test for cookie custom inspect
- Loading branch information
Showing
6 changed files
with
19 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { inspect } from 'node:util' | ||
import { Cookie } from '../cookie/cookie' | ||
|
||
describe('Cookie utils', () => { | ||
describe('custom inspect', () => { | ||
it('should be a readable string', () => { | ||
const cookie = new Cookie({ | ||
key: 'test', | ||
value: 'b', | ||
maxAge: 60, | ||
}) | ||
expect(inspect(cookie)).toBe( | ||
'Cookie="test=b; Max-Age=60; hostOnly=?; aAge=?; cAge=0ms"', | ||
) | ||
}) | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.