Buckets:
ktongue/docker_container / .cache /opencode /node_modules /process-warning /test /emit-interpolated-string.test.js
| const { test } = require('node:test') | |
| const { createWarning } = require('..') | |
| const { withResolvers } = require('./promise') | |
| test('emit with interpolated string', t => { | |
| t.plan(4) | |
| const { promise, resolve } = withResolvers() | |
| process.on('warning', onWarning) | |
| function onWarning (warning) { | |
| t.assert.deepStrictEqual(warning.name, 'TestDeprecation') | |
| t.assert.deepStrictEqual(warning.code, 'CODE') | |
| t.assert.deepStrictEqual(warning.message, 'Hello world') | |
| t.assert.ok(codeWarning.emitted) | |
| } | |
| const codeWarning = createWarning({ | |
| name: 'TestDeprecation', | |
| code: 'CODE', | |
| message: 'Hello %s' | |
| }) | |
| codeWarning('world') | |
| codeWarning('world') | |
| setImmediate(() => { | |
| process.removeListener('warning', onWarning) | |
| resolve() | |
| }) | |
| return promise | |
| }) | |
Xet Storage Details
- Size:
- 803 Bytes
- Xet hash:
- efa64f8ac2b1e54132466cd9ad80090f4684ddf14b27eaa28ff812fc5d41c92c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.