File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 117117 "proxy" : " ^1.0.2" ,
118118 "proxyquire" : " ^2.1.3" ,
119119 "request" : " ^2.88.2" ,
120- "sinon" : " ^17.0.1" ,
121120 "snazzy" : " ^9.0.0" ,
122121 "standard" : " ^17.0.0" ,
123122 "superagent" : " ^8.1.2" ,
Original file line number Diff line number Diff line change 11'use strict'
22
33const { tspl } = require ( '@matteo.collina/tspl' )
4+ const { ok } = require ( 'node:assert' )
45const { test, after, describe } = require ( 'node:test' )
56const { Client } = require ( '..' )
67const { createServer } = require ( 'node:http' )
78const { Readable } = require ( 'node:stream' )
8- const sinon = require ( 'sinon' )
99const { wrapWithAsyncIterable } = require ( './utils/async-iterators' )
1010
11- describe ( 'strictContentLength: false' , ( t ) => {
12- const emitWarningStub = sinon . stub ( process , 'emitWarning' )
11+ describe ( 'strictContentLength: false' , ( ) => {
12+ const emitWarningOriginal = process . emitWarning
13+ let emitWarningCalled = false
14+
15+ process . emitWarning = function ( ) {
16+ emitWarningCalled = true
17+ }
1318
1419 function assertEmitWarningCalledAndReset ( ) {
15- sinon . assert . called ( emitWarningStub )
16- emitWarningStub . resetHistory ( )
20+ ok ( emitWarningCalled )
21+ emitWarningCalled = false
1722 }
1823
1924 after ( ( ) => {
20- emitWarningStub . restore ( )
25+ process . emitWarning = emitWarningOriginal
2126 } )
2227
2328 test ( 'request invalid content-length' , async ( t ) => {
You can’t perform that action at this time.
0 commit comments