[Pkg-javascript-devel] Bug#952224: node-sinon: FTBFS: dh_auto_test: error: /bin/sh -e debian/tests/pkg-js/test returned exit code 1
Lucas Nussbaum
lucas at debian.org
Sun Feb 23 13:10:52 GMT 2020
Source: node-sinon
Version: 8.1.0+ds-1
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200222 ftbfs-bullseye
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> dpkg-buildpackage
> -----------------
>
> Command: dpkg-buildpackage -us -uc -sa -rfakeroot
> dpkg-buildpackage: info: source package node-sinon
> dpkg-buildpackage: info: source version 8.1.0+ds-1
> dpkg-buildpackage: info: source distribution unstable
> dpkg-buildpackage: info: source changed by Xavier Guimard <yadd at debian.org>
> dpkg-source --before-build .
> dpkg-buildpackage: info: host architecture amd64
> debian/rules clean
> dh clean --with nodejs
> dh_auto_clean --buildsystem=nodejs
> rm -rf ./node_modules/.cache
> rm -rf bane/node_modules/.cache
> rm -rf just-extend/node_modules/.cache
> rm -rf nise/node_modules/.cache
> rm -rf sinonjscommons/node_modules/.cache
> rm -rf sinonjsformatio/node_modules/.cache
> rm -rf sinonjsreferee/node_modules/.cache
> rm -rf sinonjsreferee-sinon/node_modules/.cache
> rm -rf sinonjssamsam/node_modules/.cache
> rm -rf sinonjstext-encoding/node_modules/.cache
> dh_clean
> dpkg-source -b .
> dpkg-source: info: using source format '3.0 (quilt)'
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-bane.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-just-extend.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-nise.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-sinonjscommons.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-sinonjsformatio.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-sinonjsreferee-sinon.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-sinonjsreferee.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-sinonjssamsam.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig-sinonjstext-encoding.tar.xz
> dpkg-source: info: building node-sinon using existing ./node-sinon_8.1.0+ds.orig.tar.xz
> dpkg-source: info: building node-sinon in node-sinon_8.1.0+ds-1.debian.tar.xz
> dpkg-source: info: building node-sinon in node-sinon_8.1.0+ds-1.dsc
> debian/rules binary
> dh binary --with nodejs
> dh_update_autotools_config
> dh_autoreconf
> dh_auto_configure --buildsystem=nodejs
> mkdir node_modules
> ln -s ../bane node_modules/bane
> ln -s ../just-extend node_modules/just-extend
> ln -s ../nise node_modules/nise
> mkdir -p node_modules/\@sinonjs
> ln -s ../../sinonjscommons node_modules/\@sinonjs/commons
> ln -s ../../sinonjsformatio node_modules/\@sinonjs/formatio
> ln -s ../../sinonjsreferee node_modules/\@sinonjs/referee
> ln -s ../../sinonjsreferee-sinon node_modules/\@sinonjs/referee-sinon
> ln -s ../../sinonjssamsam node_modules/\@sinonjs/samsam
> ln -s ../../sinonjstext-encoding node_modules/\@sinonjs/text-encoding
> dh_auto_build --buildsystem=nodejs
> No build command found, searching known files
> No build command found, searching known files
> No build command found, searching known files
> No build command found, searching known files
> No build command found, searching known files
> dh_auto_test --buildsystem=nodejs
> /bin/sh -e debian/tests/pkg-js/test
>
>
> assert
> ✓ is object
> ✓ supports proxy property
> .fail
> ✓ throws exception
> ✓ throws configured exception type
> with stubs
> .match
> ✓ fails when arguments to not match
> ✓ passes when argumens match
> .called
> ✓ should fail with non-function fake
> ✓ fails when method does not exist
> ✓ fails when method is not stub
> ✓ fails when method was not called
> ✓ fails when called with more than one argument
> ✓ does not fail when method was called
> ✓ calls pass callback
> .notCalled
> ✓ should fail with non-function fake
> ✓ fails when method does not exist
> ✓ fails when method is not stub
> ✓ fails when method was called
> ✓ fails when called with more than one argument
> ✓ passes when method was not called
> ✓ should call pass callback
> .calledOnce
> ✓ should fail with non-function fake
> ✓ fails when method does not exist
> ✓ fails when method is not stub
> ✓ fails when method was not called
> ✓ fails when called with more than one argument
> ✓ passes when method was called
> ✓ fails when method was called more than once
> ✓ calls pass callback
> .calledTwice
> ✓ should fail with non-function fake
> ✓ fails if called once
> ✓ fails when called with more than one argument
> ✓ passes if called twice
> ✓ calls pass callback
> .calledThrice
> ✓ should fail with non-function fake
> ✓ fails if called once
> ✓ fails when called with more than one argument
> ✓ passes if called thrice
> ✓ calls pass callback
> .callOrder
> ✓ passes when calls were done in right order
> ✓ fails when calls were done in wrong order
> ✓ passes when many calls were done in right order
> ✓ fails when one of many calls were done in wrong order
> ✓ calls pass callback
> ✓ passes for multiple calls to same spy
> ✓ fails if first spy was not called
> ✓ fails if second spy was not called
> .calledOn
> ✓ fails when method does not exist
> ✓ fails when method is not stub
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> ✓ works with spyCall
> ✓ fails when spyCall failed
> .calledWithNew
> ✓ should fail with non-function fake
> ✓ fails when method does not exist
> ✓ fails when method is not stub
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> ✓ works with spyCall
> ✓ fails when spyCall failed
> .alwaysCalledWithNew
> ✓ should fail with non-function fake
> ✓ fails when method does not exist
> ✓ fails when method is not stub
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> .calledWith
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> ✓ works with spyCall
> ✓ fails when spyCall failed
> .calledWithExactly
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> ✓ works with spyCall
> ✓ fails when spyCall failed
> .calledOnceWithExactly
> ✓ should fail with non-function fake
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> ✓ fails when method does not exist
> ✓ fails when method is not stub
> ✓ fails when method was not called
> ✓ fails when called with more than one argument
> ✓ passes when method was called
> ✓ fails when method was called more than once
> .neverCalledWith
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> .threw
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> ✓ works with spyCall
> ✓ fails when spyCall failed
> .callCount
> ✓ should fail with non-function fake
> ✓ fails when method fails
> ✓ passes when method doesn't fail
> ✓ calls pass callback
> .alwaysCalledOn
> ✓ fails if method is missing
> ✓ fails if method is not fake
> ✓ fails if stub returns false
> ✓ passes if stub returns true
> ✓ calls pass callback
> .alwaysCalledWith
> ✓ fails if method is missing
> ✓ fails if method is not fake
> ✓ fails if stub returns false
> ✓ passes if stub returns true
> ✓ calls pass callback
> .alwaysCalledWithExactly
> ✓ fails if stub returns false
> ✓ passes if stub returns true
> ✓ calls pass callback
> .expose
> ✓ exposes asserts into object
> ✓ exposes asserts into global
> ✓ fails exposed asserts without errors
> ✓ exposes asserts into object without prefixes
> ✓ does not expose 'expose'
> ✓ throws if target is undefined
> ✓ throws if target is null
> message
> ✓ assert.called exception message
> ✓ assert.notCalled exception message one call
> ✓ assert.notCalled exception message four calls
> ✓ assert.notCalled exception message with calls with arguments
> ✓ assert.callOrder exception message
> ✓ assert.callOrder with missing first call exception message
> ✓ assert.callOrder with missing last call exception message
> ✓ assert.callCount exception message
> ✓ assert.calledOnce exception message
> ✓ assert.calledTwice exception message
> ✓ assert.calledThrice exception message
> ✓ assert.calledOn exception message
> ✓ assert.alwaysCalledOn exception message
> ✓ assert.calledWithNew exception message
> ✓ assert.alwaysCalledWithNew exception message
> ✓ assert.calledWith exception message
> ✓ assert.calledWith exception message with multiple calls
> ✓ assert.calledWith exception message with large object arguments
> ✓ assert.calledWith exception message with a missing argument
> ✓ assert.calledWith exception message with an excess argument
> ✓ assert.calledWith match.any exception message
> ✓ assert.calledWith match.defined exception message
> ✓ assert.calledWith match.truthy exception message
> ✓ assert.calledWith match.falsy exception message
> ✓ assert.calledWith match.same exception message
> ✓ assert.calledWith match.typeOf exception message
> ✓ assert.calledWith match.instanceOf exception message
> ✓ assert.calledWith match object exception message
> ✓ assert.calledWith match boolean exception message
> ✓ assert.calledWith match number exception message
> ✓ assert.calledWith match string exception message
> ✓ assert.calledWith match regexp exception message
> ✓ assert.calledWith match test function exception message
> ✓ assert.calledWithMatch exception message
> ✓ assert.alwaysCalledWith exception message
> ✓ assert.alwaysCalledWithMatch exception message
> ✓ assert.calledWithExactly exception message
> ✓ assert.calledOnceWithExactly exception messages
> ✓ assert.alwaysCalledWithExactly exception message
> ✓ assert.neverCalledWith exception message
> ✓ assert.neverCalledWithMatch exception message
> ✓ assert.threw exception message
> ✓ assert.alwaysThrew exception message
> ✓ assert.match exception message
> with symbol method names
> ✓ should use the symbol's description in exception messages
> ✓ should indicate that an assertion failure with a symbol method name occured in exception messages, even if the symbol has no description
>
> behaviors
> ✓ adds and uses a custom behavior
>
> extend
> ✓ should return unaltered target when only one argument
> ✓ should copy all (own) properties into first argument, from all subsequent arguments
> ✓ should copy toString method into target
> ✓ must copy the last occurring property into the target
> ✓ copies all properties
>
> fake
> ✓ should reject non-Function argument
> module
> ✓ should return a unary Function named 'fake'
> when passed a Function
> ✓ should return a Sinon proxy
> ✓ should keep the `this` context of the wrapped function
> when passed no value
> ✓ should return a Sinon proxy
> .callback
> ✓ it should be a reference for the callback in the last call
> .displayName
> ✓ should be 'fake'
> .id
> ✓ should start with 'fake#'
> .lastArg
> ✓ should be the last argument from the last call
> .returns
> ✓ should return a function that returns the argument
> ✓ should return a Sinon proxy
> .throws
> ✓ should return a function that throws an Error, that is the argument
> ✓ should return a Sinon proxy
> ✓ should return the same error type as it is passed
> when passed a String
> ✓ should throw an Error
> .resolves
> ✓ should return a function that resolves to the argument
> ✓ should return a Sinon proxy
> .rejects
> ✓ should return a function that rejects to the argument
> ✓ should return a Sinon proxy
> ✓ should return the same error type as it is passed
> ✓ should reject with an Error when passed a String
> .yields
> ✓ should return a Sinon proxy
> ✓ should call a callback with the provided values
> ✓ should call the last function argument
> ✓ should throw if the last argument is not a function
> .yieldsAsync
> ✓ should return a Sinon proxy
> ✓ should call the callback asynchronously with the provided values
> ✓ should call the last function argument
> ✓ should throw if the last argument is not a function
> .named
> ✓ should set the name of the fake to the given string
> .calledBefore/After
> ✓ should return true if called before
> ✓ should return false if not called before
> ✓ should return true if called after
> ✓ should return false if not called after
> ✓ should pass sinon.assert.callOrder
> ✓ should fail sinon.assert.callOrder
> ✓ should return true if called immediately before
> ✓ should return false if not called immediately before
> ✓ should return true if called immediately after
> ✓ should return false if not called immediately after
> .printf
> ✓ is delegated to proxy
>
> issues
> ✓ #283
> #458
> on node
> ✓ stub out fs.readFileSync
> #624
> - useFakeTimers should be idempotent
> #852 - createStubInstance on intherited constructors
> ✓ must not throw error
> #852(2) - createStubInstance should on same constructor
> ✓ must be idempotent
> #950 - first execution of a spy as a method renames that spy
> ✓ should not rename spies
> #1026
> ✓ should stub `watch` method on any Object
> #1154
> ✓ Ensures different matchers will not be tested against each other
> #1372 - sandbox.resetHistory
> ✓ should reset spies
> #1398
> ✓ Call order takes into account both calledBefore and callCount
> #1474 - promise library should be propagated through fakes and behaviors
> ✓ stub.onCall
> ✓ stub.withArgs
> #1456
> - stub window innerHeight
> 1) "after each" hook for "stub window innerHeight"
> #1487 - withArgs() returnValue
> ✓ sets correct firstCall.returnValue
> ✓ sets correct lastCall.returnValue
> #1512 - sandbox.stub(obj,protoMethod)
> ✓ can stub methods on the prototype
> #1521 - stubbing Array.prototype.filter
> ✓ should be possible stub filter
> #1531 - some copied functions on root sinon module throw
> ✓ should create a fake server without throwing
> ✓ should create a fake server with clock without throwing
> #1442 - callThrough with a mock expectation
> ✓ should call original method
> #1648 - resetHistory
> ✓ should reset property spies
> #1775 - sinon.restore
> ✓ should restore all stubs
> ✓ should restore all spies
> ✓ should restore all mocks
> #1801 - sinon.restore spied fakeTimers
> ✓ should restore spied fake timers
> #1840 - sinon.restore useFakeXMLHttpRequest
> ✓ should restore XMLHttpRequest and ActiveXObject
> #1709 - deepEqual fails on cyclic references
> ✓ should not blow up
> #1796 - cannot stub Array.prototype.sort
> ✓ it should not fail with RangeError
> #1900 - calledWith returns false positive
> ✓ should return false when call args don't match
> #1882
> ✓ should use constructor name when checking deepEquality
> #1887
> ✓ should not break stub behavior using multiple `match.any`
> #1986
> ✓ should not set `lastArg` to undefined when last argument is `false`
> #1964
> ✓ should allow callThrough on a withArgs fake
> #2016
> called on individual stub method
> ✓ should clear 'called' status on stub
> called on module
> ✓ should clear 'called' status on all stubs
> #2073 - sinon.createStubInstance()
> ✓ should override the method
> ✓ should support calling without object binding
> #2065
> ✓ should restore the state of lastArg on the stub when resetting the sandbox
>
> sinonMock
> ✓ creates anonymous mock functions
> ✓ creates named anonymous mock functions
> .create
> ✓ returns function with expects method
> ✓ throws without object
> .expects
> ✓ throws without method
> ✓ returns expectation
> ✓ throws if expecting a non-existent method
> .expectation
> ✓ creates unnamed expectation
> ✓ uses 'anonymous mock expectation' for unnamed expectation
> ✓ call expectation
> ✓ is invokable
> .returns
> ✓ returns configured return value
> call
> ✓ is called with correct this value
> .callCount
> ✓ onlys be invokable once by default
> ✓ throw readable error
> .callCountNever
> ✓ is not callable
> ✓ returns expectation for chaining
> .callCountOnce
> ✓ allows one call
> ✓ returns expectation for chaining
> .callCountTwice
> ✓ allows two calls
> ✓ returns expectation for chaining
> .callCountThrice
> ✓ allows three calls
> ✓ returns expectation for chaining
> .callCountExactly
> ✓ allows specified number of calls
> ✓ returns expectation for chaining
> ✓ throws without argument
> ✓ throws without number
> ✓ throws with Symbol
> .atLeast
> ✓ throws without argument
> ✓ throws without number
> ✓ throws with Symbol
> ✓ returns expectation for chaining
> ✓ allows any number of calls
> ✓ should not be met with too few calls
> ✓ is met with exact calls
> ✓ is met with excessive calls
> ✓ should not throw when exceeding at least expectation
> ✓ should not throw when exceeding at least expectation and withargs
> .atMost
> ✓ throws without argument
> ✓ throws without number
> ✓ throws with Symbol
> ✓ returns expectation for chaining
> ✓ allows fewer calls
> ✓ is met with fewer calls
> ✓ is met with exact calls
> ✓ should not be met with excessive calls
> .atMostAndAtLeast
> ✓ should not be met with too few calls
> ✓ is met with minimum calls
> ✓ is met with maximum calls
> ✓ throws with excessive calls
> .met
> ✓ should not be met when not called enough times
> ✓ is met when called enough times
> ✓ should not be met when called too many times
> .withArgs
> ✓ returns expectation for chaining
> ✓ accepts call with expected args
> ✓ throws when called without args
> ✓ throws when called with too few args
> ✓ throws when called with wrong args
> ✓ allows excessive args
> ✓ calls accept with no args
> ✓ allows no args called with excessive args
> ✓ works with sinon matchers
> ✓ throws when sinon matchers fail
> ✓ should not throw when expectation withArgs using matcher
> .withExactArgs
> ✓ returns expectation for chaining
> ✓ accepts call with expected args
> ✓ throws when called without args
> ✓ throws when called with too few args
> ✓ throws when called with wrong args
> ✓ should not allow excessive args
> ✓ accepts call with no expected args
> ✓ does not allow excessive args with no expected args
> .on
> ✓ returns expectation for chaining
> ✓ allows calls on object
> ✓ throws if called on wrong object
> ✓ throws if calls on wrong Symbol
> .verify
> ✓ pass if met
> ✓ throws if not called enough times
> ✓ throws readable error
> .verify
> ✓ restores mocks
> ✓ passes verified mocks
> ✓ restores if not met
> ✓ includes all calls in error message
> ✓ includes exact expected arguments in error message
> ✓ includes received call count in error message
> ✓ includes unexpected calls in error message
> ✓ includes met expectations in error message
> ✓ includes met expectations in error message from verify
> ✓ reports min calls in error message
> ✓ reports max calls in error message
> ✓ reports min calls in met expectation
> ✓ reports max and min calls in error messages
> ✓ fails even if the original expectation exception was caught
> ✓ does not call pass if no expectations
> .usingPromise
> ✓ must be a function
> ✓ must return the mock
> ✓ must set all expectations with mockPromise
> mock object
> ✓ mocks object method
> ✓ reverts mocked method
> ✓ reverts expectation
> ✓ reverts mock
> ✓ verifies mock
> ✓ verifies mock with unmet expectations
> mock method multiple times
> ✓ queues expectations
> ✓ starts on next expectation when first is met
> ✓ fails on last expectation
> ✓ allows mock calls in any order
> mock function
> ✓ returns mock method
> ✓ returns mock object
> .yields
> ✓ invokes only argument as callback
> ✓ throws understandable error if no callback is passed
>
> sinonSpy.call
> ✓ captures a stack trace
> call object
> ✓ gets call object
> ✓ stores given call id
> ✓ throws if callId is undefined
> ✓ records ascending call id's
> ✓ exposes thisValue property
> ✓ has methods to test relative ordering
> call calledOn
> ✓ calledOn should return true
> ✓ calledOn should return false
> call.calledWith
> ✓ returns true if all args match
> ✓ returns true if first args match
> ✓ returns true if first arg match
> ✓ returns true for no args
> ✓ returns false for too many args
> ✓ returns false for wrong arg
> call.calledWithMatch
> ✓ returns true if all args match
> ✓ returns true if first args match
> ✓ returns true if first arg match
> ✓ returns true for no args
> ✓ returns false for too many args
> ✓ returns false for wrong arg
> call.notCalledWith
> ✓ returns false if all args match
> ✓ returns false if first args match
> ✓ returns false if first arg match
> ✓ returns false for no args
> ✓ returns true for too many args
> ✓ returns true for wrong arg
> call.notCalledWithMatch
> ✓ returns false if all args match
> ✓ returns false if first args match
> ✓ returns false if first arg match
> ✓ returns false for no args
> ✓ returns true for too many args
> ✓ returns true for wrong arg
> call.calledWithExactly
> ✓ returns true when all args match
> ✓ returns false for too many args
> ✓ returns false for too few args
> ✓ returns false for unmatching args
> ✓ returns true for no arguments
> ✓ returns false when called with no args but matching one
> call.callArg
> ✓ calls argument at specified index
> ✓ throws if argument at specified index is not callable
> ✓ throws if no index is specified
> ✓ returns callbacks return value
> ✓ throws if index is not number
> call.callArgOn
> ✓ calls argument at specified index
> ✓ throws if argument at specified index is not callable
> ✓ returns callbacks return value
> ✓ throws if index is not number
> call.callArgWith
> ✓ calls argument at specified index with provided args
> ✓ calls callback without args
> ✓ calls callback wit multiple args
> ✓ returns callbacks return value
> ✓ throws if no index is specified
> ✓ throws if index is not number
> call.callArgOnWith
> ✓ calls argument at specified index with provided args
> ✓ calls callback without args
> ✓ calls callback with multiple args
> ✓ returns callbacks return value
> ✓ throws if argument at specified index is not callable
> ✓ throws if index is not number
> .callback
> ✓ it should be a reference for the callback
> .lastArg
> ✓ should be the last argument from the call
> call.yieldTest
> ✓ invokes only argument as callback
> ✓ throws understandable error if no callback is passed
> ✓ includes stub name and actual arguments in error
> ✓ invokes last argument as callback
> ✓ invokes first of two callbacks
> ✓ invokes callback with arguments
> ✓ returns callbacks return value
> ✓ throws if callback throws
> call.invokeCallback
> ✓ is alias for yield
> call.yieldOnTest
> ✓ invokes only argument as callback
> ✓ throws understandable error if no callback is passed
> ✓ includes stub name and actual arguments in error
> ✓ invokes last argument as callback
> ✓ invokes first of two callbacks
> ✓ invokes callback with arguments
> ✓ returns callbacks return value
> ✓ throws if callback throws
> call.yieldTo
> ✓ invokes only argument as callback
> ✓ throws understandable error if no callback is passed
> ✓ includes stub name and actual arguments in error
> ✓ invokes property on last argument as callback
> ✓ invokes first of two possible callbacks
> ✓ invokes callback with arguments
> ✓ returns callbacks return value
> ✓ throws if callback throws
> call.yieldToOn
> ✓ invokes only argument as callback
> ✓ throws understandable error if no callback is passed
> ✓ throws understandable error if symbol prop is not found
> ✓ includes stub name and actual arguments in error
> ✓ invokes property on last argument as callback
> ✓ invokes first of two possible callbacks
> ✓ invokes callback with arguments
> ✓ returns callbacks return value
> ✓ throws if callback throws
> call.toString
> ✓ includes spy name
> ✓ includes single argument
> ✓ includes all arguments
> ✓ includes explicit return value
> ✓ includes empty string return value
> ✓ includes exception
> ✓ includes exception message if any
> ✓ formats arguments with sinonFormat
> ✓ formats return value with sinonFormat
> ✓ does not throw when the call stack is empty
> constructor
> ✓ creates original object
> ✓ does not interfere with instanceof
> ✓ records usage
> functions
> ✓ throws if spying on non-existent property
> ✓ throws if spying on non-existent object
> ✓ haves toString method
> ✓ toString should say 'spy' when unable to infer name
> ✓ toString should report name of spied function
> ✓ toString should prefer displayName property if available
> ✓ toString should prefer property name if possible
> .reset
> ✓ resets spy state
> ✓ resets call order state
> ✓ resets fakes returned by withArgs
> .withArgs
> ✓ defines withArgs method
> ✓ records single call
> ✓ records non-matching call on original spy
> ✓ records non-matching call with several arguments separately
> ✓ records for partial argument match
> ✓ records filtered spy when original throws
> ✓ returns existing override for arguments
> ✓ chains withArgs calls on original spy
> ✓ initializes filtered spy with callCount
> ✓ initializes filtered spy with first, second, third and last call
> ✓ initializes filtered spy with arguments
> ✓ initializes filtered spy with thisValues
> ✓ initializes filtered spy with return values
> ✓ initializes filtered spy with call order
> ✓ initializes filtered spy with exceptions
>
> proxy
> .printf
> ✓ count
> ✓ thisValues
> ✓ unmatched
> ✓ *
> name
> ✓ named
> ✓ anon
> calls
> ✓ oneLine
> ✓ multiline
> arguments
> ✓ no calls
> ✓ single call with arguments
> ✓ single call without arguments
> ✓ multiple calls with arguments
> ✓ multiple calls without arguments
>
> restore-object
> ✓ is defined
> ✓ throws on falsy input
> ✓ throws with no spies or stubs
> ✓ works with mixed spies and stubs
> ✓ restores entire spied object
> ✓ restores entire stubbed object
>
> Sandbox
> ✓ exposes match
> ✓ exposes assert
> ✓ can be reset without failing when pre-configured to use a fake server
> ✓ can be reset without failing when configured to use a fake server
> .mock
> ✓ returns a mock
> ✓ adds mock to fake array
> ✓ appends mocks to fake array
> stub and mock test
> ✓ appends mocks and stubs to fake array
> .spy
> ✓ should return a spy
> ✓ should add a spy to the internal collection
> .createStubInstance
> ✓ stubs existing methods
> ✓ should require a function
> ✓ resets all stub methods on reset()
> ✓ doesn't stub fake methods
> ✓ doesn't call the constructor
> ✓ retains non function values
> ✓ has no side effects on the prototype
> ✓ throws exception for non function params
> ✓ allows providing optional overrides
> ✓ allows providing optional returned values
> ✓ allows providing null as a return value
> ✓ throws an exception when trying to override non-existing property
> .stub
> ✓ fails if stubbing property on null
> ✓ fails if stubbing symbol on null
> ✓ creates a stub
> ✓ adds stub to fake array
> ✓ appends stubs to fake array
> ✓ adds all object methods to fake array
> ✓ returns a stubbed object
> ✓ returns a stubbed method
> on node
> ✓ stubs environment property
> stub anything
> ✓ stubs number property
> ✓ restores number property
> ✓ fails if property does not exist
> ✓ fails if Symbol does not exist
> .fake
> ✓ should return a fake
> ✓ should add a fake to the internal collection
> .returns
> ✓ should return a fake behavior
> ✓ should add a fake behavior to the internal collection
> .throws
> ✓ should return a fake behavior
> ✓ should add a fake behavior to the internal collection
> .resolves
> ✓ should return a fake behavior
> ✓ should add a fake behavior to the internal collection
> .rejects
> ✓ should return a fake behavior
> ✓ should add a fake behavior to the internal collection
> .yields
> ✓ should return a fake behavior
> ✓ should add a fake behavior to the internal collection
> .yieldsAsync
> ✓ should return a fake behavior
> ✓ should add a fake behavior to the internal collection
> .verifyAndRestore
> ✓ calls verify and restore
> ✓ throws when restore throws
> ✓ calls restore when restore throws
> .replace
> ✓ should replace a function property
> ✓ should replace a non-function property
> ✓ should replace an inherited property
> ✓ should error on missing descriptor
> ✓ should error on missing replacement
> ✓ should refuse to replace a non-function with a function
> ✓ should refuse to replace a function with a non-function
> ✓ should refuse to replace a fake twice
> ✓ should refuse to replace a string twice
> ✓ should return the replacement argument
> when asked to replace a getter
> ✓ should throw an Error
> when asked to replace a setter
> ✓ should throw an Error
> .replaceGetter
> ✓ should replace getters
> ✓ should return replacement
> ✓ should replace an inherited property
> ✓ should error on missing descriptor
> ✓ should error when descriptor has no getter
> ✓ allows restoring getters
> ✓ should refuse to replace a getter twice
> when called with a non-function replacement argument
> ✓ should throw a TypeError
> .replaceSetter
> ✓ should replace setter
> ✓ should return replacement
> ✓ should replace an inherited property
> ✓ should error on missing descriptor
> ✓ should error when descriptor has no setter
> ✓ allows restoring setters
> ✓ should refuse to replace a setter twice
> when called with a non-function replacement argument
> ✓ should throw a TypeError
> .reset
> ✓ calls reset on all fakes
> ✓ calls resetHistory on all fakes
> ✓ resets fake behaviours
> .resetBehavior
> ✓ calls resetBehavior on all fakes
> .resetHistory
> ✓ resets the history on all fakes
> ✓ calls reset on fake that does not have a resetHistory
> .useFakeTimers
> ✓ returns clock object
> ✓ exposes clock property
> ✓ uses restorable clock
> ✓ passes arguments to sinon.useFakeTimers
> ✓ restores the fakeTimer clock created by the sandbox when the sandbox is restored
> ✓ restores spied fake timers when then sanddox is restored
> .usingPromise
> ✓ must be a function
> ✓ must return the sandbox
> ✓ must set all stubs created from sandbox with mockPromise
> ✓ must set all stubs created from sandbox with mockPromise
> ✓ must set all mocks created from sandbox with mockPromise
> .inject
> ✓ injects spy, stub, mock, fake, replace, replaceSetter, createStubInstance
> ✓ should inject callable functions
> ✓ does not define clock, server and requests objects
> ✓ defines clock when using fake time
> ✓ should return object
> .verify
> ✓ calls verify on all fakes
> .restore
> ✓ throws when passed arguments
> ✓ restores all fields of a spied object
> ✓ restores all fields of a stubbed object
> configurable sandbox
> ✓ yields stub, mock as arguments
> ✓ yields spy, stub, mock as arguments
> ✓ does not yield server when not faking xhr
> ✓ does not inject properties if they are already present
> ✓ fakes specified timers
> ✓ injects sandbox
> ✓ injects match
> getters and setters
> ✓ allows stubbing getters
> ✓ allows restoring getters
> ✓ allows stubbing setters
> ✓ allows restoring setters
>
> sinon module
> exports
> default sandbox
> ✓ should be an instance of Sandbox
> createSandbox
> ✓ should be a unary Function named 'createSandbox'
> fakeServer
> ✓ should be the fakeServer export from nise
> createFakeServer
> ✓ should be fakeServer.create from nise
> fakeServerWithClock
> ✓ should be the fakeServerWithClock export from nise
> createFakeServerWithClock
> ✓ should be fakeServerWithClock.create from nise
> xhr
> ✓ should be the fakeXhr.xhr export from nise
> FakeXMLHttpRequest
> ✓ should be the fakeXhr.FakeXMLHttpRequest export from nise
> useFakeXMLHttpRequest
> ✓ should be the fakeXhr.useFakeXMLHttpRequest export from nise
>
> spy
> ✓ does not throw if called without function
> ✓ does not throw when calling anonymous spy
> ✓ returns spy function
> ✓ mirrors custom properties on function
> ✓ does not define create method
> ✓ does not overwrite original create property
> ✓ sets up logging arrays
> ✓ works with getters
> ✓ works with setters
> ✓ works with setters and getters combined
> ✓ should work with combination of withArgs arguments and order of calling withArgs
> global.Error
> ✓ creates a spy for Error
> .named
> ✓ sets name and displayName
> call
> ✓ calls underlying function
> ✓ passes 'new' to underlying function
> ✓ passs arguments to function
> ✓ maintains this binding
> ✓ returns function's return value
> ✓ throws if function throws
> ✓ retains function name
> ✓ retains function length 0
> ✓ retains function length 1
> ✓ retains function length 2
> ✓ retains function length 3
> ✓ retains function length 4
> ✓ retains function length 12
> .called
> ✓ is false prior to calling the spy
> ✓ is true after calling the spy once
> ✓ is true after calling the spy twice
> .notCalled
> ✓ is true prior to calling the spy
> ✓ is false after calling the spy once
> .calledOnce
> ✓ is false prior to calling the spy
> ✓ is true after calling the spy once
> ✓ is false after calling the spy twice
> .calledTwice
> ✓ is false prior to calling the spy
> ✓ is false after calling the spy once
> ✓ is true after calling the spy twice
> ✓ is false after calling the spy thrice
> .calledThrice
> ✓ is false prior to calling the spy
> ✓ is false after calling the spy twice
> ✓ is true after calling the spy thrice
> ✓ is false after calling the spy four times
> .callCount
> ✓ reports 0 calls
> ✓ records one call
> ✓ records two calls
> ✓ increases call count for each call
> .calledOn
> ✓ is false if spy wasn't called
> ✓ is true if called with thisValue
> ✓ returns false if not called on object
> ✓ is true if called with matcher that returns true
> ✓ is false if called with matcher that returns false
> ✓ invokes matcher.test with given object
> in browser
> - is true if called on object at least once
> .alwaysCalledOn
> ✓ is false prior to calling the spy
> ✓ is true if called with thisValue once
> ✓ is true if called with thisValue many times
> ✓ is false if called with another object atleast once
> ✓ is false if never called with expected object
> .calledWithNew
> ✓ is false if spy wasn't called
> ✓ is true if called with new
> ✓ is true if called with new on custom constructor
> ✓ is false if called as function
> ✓ is true newed constructor returns object
> in browser
> - is true if called with new at least once
> spied native function
>
>
> ✓ is false when called on spied native function
> .alwaysCalledWithNew
> ✓ is false if spy wasn't called
> ✓ is true if always called with new
> ✓ is false if called as function once
> .thisValues
> ✓ contains one object
> ✓ stacks up objects
> .calledWith
> ✓ returns false if spy was not called
> ✓ returns true if spy was called with args
> ✓ returns true if called with args at least once
> ✓ returns false if not called with args
> ✓ returns false if not called with undefined
> ✓ returns true for partial match
> ✓ matchs all arguments individually, not as array
> ✓ uses matcher
> ✓ uses matcher in object
> when called with an Object without a prototype
> ✓ must not throw
> .calledWithMatch
> ✓ returns false if spy was not called
> ✓ returns true if spy was called with args
> ✓ returns true if called with args at least once
> ✓ returns false if not called with args
> ✓ returns false if not called with undefined
> ✓ returns true for partial match
> ✓ matchs all arguments individually, not as array
> ✓ uses matcher
> ✓ uses matcher in object
> when called with an Object without a prototype
> ✓ must not throw
> .calledWithMatchSpecial
> ✓ checks substring match
> ✓ checks for regexp match
> ✓ checks for partial object match
> .alwaysCalledWith
> ✓ returns false if spy was not called
> ✓ returns true if spy was called with args
> ✓ returns false if called with args only once
> ✓ returns false if not called with args
> ✓ returns true for partial match
> ✓ returns true for partial match on many calls
> ✓ matchs all arguments individually, not as array
> .alwaysCalledWithMatch
> ✓ returns false if spy was not called
> ✓ returns true if spy was called with args
> ✓ returns false if called with args only once
> ✓ returns false if not called with args
> ✓ returns true for partial match
> ✓ returns true for partial match on many calls
> ✓ matchs all arguments individually, not as array
> .alwaysCalledWithMatchSpecial
> ✓ checks true
> ✓ checks false
> ✓ checks substring match
> ✓ checks regexp match
> ✓ checks partial object match
> .neverCalledWith
> ✓ returns true if spy was not called
> ✓ returns false if spy was called with args
> ✓ returns false if called with args at least once
> ✓ returns true if not called with args
> ✓ returns false for partial match
> ✓ matchs all arguments individually, not as array
> .neverCalledWithMatch
> ✓ returns true if spy was not called
> ✓ returns false if spy was called with args
> ✓ returns false if called with args at least once
> ✓ returns true if not called with args
> ✓ returns false for partial match
> ✓ matchs all arguments individually, not as array
> .neverCalledWithMatchSpecial
> ✓ checks substring match
> ✓ checks regexp match
> ✓ checks partial object match
> .args
> ✓ contains real arrays
> ✓ contains empty array when no arguments
> ✓ contains array with first call's arguments
> ✓ stacks up arguments in nested array
> .calledWithExactly
> ✓ returns false for partial match
> ✓ returns false for missing arguments
> ✓ returns true for exact match
> ✓ matchs by strict comparison
> ✓ returns true for one exact match
> ✓ returns true when all properties of an object argument match
> ✓ returns false when a property of an object argument is set to undefined
> ✓ returns false when a property of an object argument is set to a different value
> ✓ returns false when an object argument has a different property/value pair
> ✓ returns false when property of Object argument is set to undefined and has a different name
> ✓ returns false when any properties of an object argument aren't present
> ✓ returns false when an object argument has extra properties
> .calledOnceWith
> ✓ returns true for not exact match
> ✓ returns false for matching calls but called more then once
> ✓ return false for one mismatched call
> ✓ return false for one mismatched call with some other
> .calledOnceWithExactly
> ✓ returns true for exact match
> ✓ returns false for exact parameters but called more then once
> ✓ return false for one mismatched call
> ✓ return false for one mismatched call with some other
> .alwaysCalledWithExactly
> ✓ returns false for partial match
> ✓ returns false for missing arguments
> ✓ returns true for exact match
> ✓ returns false for excess arguments
> ✓ returns false for one exact match
> ✓ returns true for only exact matches
> ✓ returns false for no exact matches
> .threw
> ✓ returns exception thrown by function
> ✓ returns false if spy did not throw
> ✓ returns true if spy threw
> ✓ returns true if string type matches
> ✓ returns false if string did not match
> ✓ returns false if spy did not throw specified error
> ✓ returns true if string matches
> ✓ returns false if strings do not match
> .alwaysThrew
> ✓ returns true when spy threw
> ✓ returns false if spy did not throw
> ✓ returns true if spy threw
> ✓ returns true if string type matches
> ✓ returns false if string did not match
> ✓ returns false if spy did not throw specified error
> ✓ returns false if some calls did not throw
> ✓ returns true if all calls threw
> ✓ returns true if all calls threw same type
> .exceptions
> ✓ contains exception thrown by function
> ✓ contains undefined entry when function did not throw
> ✓ stacks up exceptions and undefined
> .returned
> ✓ returns true when no argument
> ✓ returns true for undefined when no explicit return
> ✓ returns true when returned value once
> ✓ returns false when value is never returned
> ✓ returns true when value is returned several times
> ✓ compares values deeply
> ✓ compares values strictly using match.same
> .returnValues
> ✓ contains undefined when function does not return explicitly
> ✓ contains return value
> ✓ contains undefined when function throws
> ✓ contains the created object for spied constructors
> ✓ contains the return value for spied constructors that explicitly return objects
> ✓ contains the created object for spied constructors that explicitly return primitive values
> ✓ stacks up return values
> .calledBefore
> ✓ is function
> ✓ returns true if first call to A was before first to B
> ✓ compares call order of calls directly
> ✓ returns false if not called
> ✓ returns true if other not called
> ✓ returns false if other called first
> .calledAfter
> ✓ is function
> ✓ returns true if first call to A was after first to B
> ✓ compares calls directly
> ✓ returns false if not called
> ✓ returns false if other not called
> ✓ returns true if called anytime after other
> .calledImmediatelyAfter
> ✓ is function
> ✓ returns true if first call to A was immediately after first to B
> ✓ compares calls directly
> ✓ returns false if not called
> ✓ returns false if other not called
> ✓ returns false if other called last
> ✓ returns false if another spy called between
> .calledImmediatelyBefore
> ✓ is function
> ✓ returns true if first call to A was immediately after first to B
> ✓ compares calls directly
> ✓ returns false if not called
> ✓ returns false if other not called
> ✓ returns false if other called last
> ✓ returns false if another spy called between
> .firstCall
> ✓ is undefined by default
> ✓ is equal to getCall(0) result after first call
> ✓ is equal to getCall(0) after first call when control flow has continued after invocation
> ✓ is tracked even if exceptions are thrown
> ✓ has correct returnValue
> ✓ has correct exception
> .secondCall
> ✓ is null by default
> ✓ stills be null after first call
> ✓ is equal to getCall(1) result after second call
> .thirdCall
> ✓ is undefined by default
> ✓ stills be undefined after second call
> ✓ is equal to getCall(1) result after second call
> .getCall
> ✓ is null for indexes >= length
> ✓ is null for indexes < -length
> ✓ is same as last call when passed index -1
> ✓ is same as n-1th call when passed index -2
> .lastCall
> ✓ is undefined by default
> ✓ is same as firstCall after first call
> ✓ is same as secondCall after second call
> ✓ is same as thirdCall after third call
> ✓ is equal to getCall(3) result after fourth call
> ✓ is equal to getCall(4) result after fifth call
> .getCalls
> ✓ returns an empty Array by default
> ✓ is analogous to using getCall(n)
> .callArg
> ✓ is function
> ✓ invokes argument at index for all calls
> ✓ throws if argument at index is not a function
> ✓ throws if spy was not yet invoked
> ✓ includes spy name in error message
> ✓ throws if index is not a number
> ✓ passs additional arguments
> ✓ returns callbacks return values for all calls
> .callArgOn
> ✓ is function
> ✓ invokes argument at index for all calls
> ✓ throws if argument at index is not a function
> ✓ throws if spy was not yet invoked
> ✓ includes spy name in error message
> ✓ throws if index is not a number
> ✓ pass additional arguments
> ✓ returns callbacks return values for all calls
> .callArgWith
> ✓ is alias for callArg
> .callArgOnWith
> ✓ is alias for callArgOn
> .yield
> ✓ is function
> ✓ invokes first function arg for all calls
> ✓ throws if spy was not yet invoked
> ✓ includes spy name in error message
> ✓ passs additional arguments
> ✓ returns callbacks return values for all calls
> .invokeCallback
> ✓ is alias for yield
> .yieldOn
> ✓ is function
> ✓ invokes first function arg for all calls
> ✓ throws if spy was not yet invoked
> ✓ includes spy name in error message
> ✓ pass additional arguments
> ✓ returns callbacks return values for all calls
> .yieldTo
> ✓ is function
> ✓ invokes first function arg for all calls
> ✓ throws if spy was not yet invoked
> ✓ includes spy name in error message
> ✓ throws readable message for symbol when spy was not yet invoked
> ✓ pass additional arguments
> ✓ returns callbacks return values for all calls
> .yieldToOn
> ✓ is function
> ✓ invokes first function arg for all calls
> ✓ throws if spy was not yet invoked
> ✓ includes spy name in error message
> ✓ throws readable message for symbol when spy was not yet invoked
> ✓ pass additional arguments
> ✓ returns callbacks return values for all calls
> .throwArg
> ✓ should be a function
> ✓ should throw if spy hasn't been called
> ✓ should throw if there aren't enough arguments in the previous spy call
> ✓ should throw specified argument
> .resetHistory
> ✓ return same object
> ✓ throws if called during spy invocation
> .length
> ✓ is zero by default
> ✓ matches the function length
> .matchingFakes
> ✓ is function
> ✓ returns an empty array by default
> ✓ returns one matched fake
> ✓ return some matched fake
> .id
> ✓ should start with 'spy#'
> non enumerable properties
> ✓ create and call spy apis
> ✓ create spy from function
> .printf
> ✓ is delegated to proxy
> everything
> ✓ replaces all methods of an object when no property is given
> ✓ replaces prototype methods
> ✓ returns object
> ✓ only replaces functions
> ✓ handles non-enumerable properties
> ✓ handles non-enumerable properties on prototypes
> ✓ does not replace non-enumerable properties from Object.prototype
> ✓ does not fail on overrides
> ✓ throws on non-existent property
>
> stub
> ✓ is spy
> ✓ does not define create method
> ✓ fails if stubbing property on null
> ✓ throws a readable error if stubbing Symbol on null
> ✓ should contain asynchronous versions of callsArg*, and yields* methods
> ✓ should allow overriding async behavior with sync behavior
> ✓ should works with combination of withArgs arguments
> ✓ should work with combination of withArgs arguments
> ✓ retains function name
> non enumerable properties
> ✓ create and call spy apis
> ✓ create stub from function on object
> .returns
> ✓ returns specified value
> ✓ returns should return stub
> ✓ returns undefined
> ✓ supersedes previous throws
> ✓ throws only on the first call
> .resolves
> ✓ returns a promise to the specified value
> ✓ should return the same stub
> ✓ supersedes previous throws
> ✓ supersedes previous rejects
> ✓ can be superseded by returns
> ✓ does not invoke Promise.resolve when the behavior is added to the stub
> .rejects
> ✓ returns a promise which rejects for the specified reason
> ✓ should return the same stub
> ✓ specifies exception message
> ✓ does not specify exception message if not provided
> ✓ rejects for a generic reason
> ✓ can be superseded by returns
> ✓ does not invoke Promise.reject when the behavior is added to the stub
> .resolvesThis
> ✓ returns a promise resolved with this
> ✓ returns a promise resolved with the context bound with stub#call
> ✓ returns a promise resolved with the context bound with stub#apply
> ✓ returns the stub itself, allowing to chain function calls
> ✓ overrides throws behavior for error objects
> ✓ overrides throws behavior for dynamically created errors
> .resolvesArg
> ✓ returns a promise to the argument at specified index
> ✓ returns a promise to the argument at another specified index
> ✓ should return the same stub
> ✓ supersedes previous throws
> ✓ supersedes previous rejects
> ✓ does not invoke Promise.resolve when the behavior is added to the stub
> ✓ throws if index is not a number
> ✓ throws without enough arguments
> .returnsArg
> ✓ returns argument at specified index
> ✓ returns stub
> ✓ throws if no index is specified
> ✓ should throw without enough arguments
> .throwsArg
> ✓ throws argument at specified index
> ✓ returns stub
> ✓ throws TypeError if no index is specified
> ✓ should throw without enough arguments
> ✓ should work with call-based behavior
> ✓ should be reset by .resetBeahvior
> .returnsThis
> ✓ stub returns this
> ✓ stub returns undefined when detached
> ✓ stub respects call/apply
> ✓ returns stub
> .usingPromise
> ✓ should exist and be a function
> ✓ should return the current stub
> ✓ should set the promise used by resolve
> ✓ should set the promise used by reject
> .throws
> ✓ throws specified exception
> ✓ returns stub
> ✓ sets type of exception to throw
> ✓ specifies exception message
> ✓ does not specify exception message if not provided
> ✓ throws generic error
> ✓ throws an exception created using a function
> ✓ resets 'invoking' flag
> lazy instantiation of exceptions
> ✓ uses a lazily created exception for the generic error
> ✓ uses a lazily created exception for the named error
> ✓ uses a lazily created exception provided by a function
> ✓ does not use a lazily created exception if the error object is provided
> .callsArg
> ✓ calls argument at specified index
> ✓ returns stub
> ✓ throws if argument at specified index is not callable
> ✓ throws if no index is specified
> ✓ throws if index is not number
> ✓ should throw without enough arguments
> ✓ returns result of invocant
> .callsArgWith
> ✓ calls argument at specified index with provided args
> ✓ returns function
> ✓ calls callback without args
> ✓ calls callback with multiple args
> ✓ throws if no index is specified
> ✓ throws if index is not number
> ✓ returns result of invocant
> .callsArgOn
> ✓ calls argument at specified index
> ✓ calls argument at specified index with undefined context
> ✓ calls argument at specified index with number context
> ✓ returns stub
> ✓ throws if argument at specified index is not callable
> ✓ throws if no index is specified
> ✓ throws if index is not number
> ✓ returns result of invocant
> .callsArgOnWith
> ✓ calls argument at specified index with provided args
> ✓ calls argument at specified index with provided args and undefined context
> ✓ calls argument at specified index with provided args and number context
> ✓ calls argument at specified index with provided args with undefined context
> ✓ calls argument at specified index with provided args with number context
> ✓ returns function
> ✓ calls callback without args
> ✓ calls callback with multiple args
> ✓ throws if no index is specified
> ✓ throws if index is not number
> ✓ returns result of invocant
> .callsFake
> ✓ uses provided function as stub
> ✓ is overwritten by subsequent stub behavior
> .objectMethod
> ✓ throws when third argument is provided
> ✓ stubbed method should be proper stub
> ✓ stub should be spy
> ✓ stub should affect spy
> ✓ handles threw properly for lazily instantiated Errors
> ✓ returns standalone stub without arguments
> ✓ successfully stubs falsy properties
> ✓ does not stub string
> everything
> ✓ replaces all methods of an object when no property is given
> ✓ replaces prototype methods
> ✓ returns object
> ✓ only replaces functions
> ✓ handles non-enumerable properties
> ✓ handles non-enumerable properties on prototypes
> ✓ does not replace non-enumerable properties from Object.prototype
> ✓ does not fail on overrides
> ✓ throws on non-existent property
> ✓ returns function
> ✓ stubs methods of function
> ✓ does not call getter during restore
> stubbed function
> ✓ has toString method
> ✓ toString should say 'stub' when unable to infer name
> ✓ toString should prefer property name if possible
> .yields
> ✓ invokes only argument as callback
> ✓ throws understandable error if no callback is passed
> ✓ includes stub name and actual arguments in error
> ✓ invokes last argument as callback
> ✓ invokes first of two callbacks
> ✓ invokes callback with arguments
> ✓ throws if callback throws
> ✓ throws takes precedent over yielded return value
> ✓ returns takes precedent over yielded return value
> ✓ returnsArg takes precedent over yielded return value
> ✓ returnsThis takes precedent over yielded return value
> ✓ returns the result of the yielded callback
> .yieldsRight
> ✓ invokes only argument as callback
> ✓ throws understandable error if no callback is passed
> ✓ includes stub name and actual arguments in error
> ✓ invokes last argument as callback
> ✓ invokes the last of two callbacks
> ✓ invokes callback with arguments
> ✓ throws if callback throws
> ✓ throws takes precedent over yielded return value
> ✓ returns takes precedent over yielded return value
> ✓ returnsArg takes precedent over yielded return value
> ✓ returnsThis takes precedent over yielded return value
> ✓ returns the result of the yielded callback
> .yieldsOn
> ✓ invokes only argument as callback
> ✓ throws if no context is specified
> ✓ throws understandable error if no callback is passed
> ✓ includes stub name and actual arguments in error
> ✓ invokes last argument as callback
> ✓ invokes first of two callbacks
> ✓ invokes callback with arguments
> ✓ throws if callback throws
> ✓ throws takes precedent over yielded return value
> ✓ returns takes precedent over yielded return value
> ✓ returnsArg takes precedent over yielded return value
> ✓ returnsThis takes precedent over yielded return value
> ✓ returns the result of the yielded callback
> .yieldsTo
> ✓ yields to property of object argument
> ✓ throws understandable error if no object with callback is passed
> ✓ throws understandable error if failing to yield callback by symbol
> ✓ includes stub name and actual arguments in error
> ✓ invokes property on last argument as callback
> ✓ invokes first of two possible callbacks
> ✓ invokes callback with arguments
> ✓ throws if callback throws
> ✓ throws takes precedent over yielded return value
> ✓ returns takes precedent over yielded return value
> ✓ returnsArg takes precedent over yielded return value
> ✓ returnsThis takes precedent over yielded return value
> ✓ returns the result of the yielded callback
> .yieldsToOn
> ✓ yields to property of object argument
> ✓ yields to property of object argument with undefined context
> ✓ yields to property of object argument with number context
> ✓ throws understandable error if no object with callback is passed
> ✓ includes stub name and actual arguments in error
> ✓ invokes property on last argument as callback
> ✓ invokes first of two possible callbacks
> ✓ invokes callback with arguments
> ✓ throws if callback throws
> ✓ throws takes precedent over yielded return value
> ✓ returns takes precedent over yielded return value
> ✓ returnsArg takes precedent over yielded return value
> ✓ returnsThis takes precedent over yielded return value
> ✓ returns the result of the yielded callback
> .withArgs
> ✓ defines withArgs method
> ✓ creates filtered stub
> ✓ filters return values based on arguments
> ✓ filters exceptions based on arguments
> ✓ ensure stub recognizes samsam match fuzzy arguments
> ✓ ensure stub uses last matching arguments
> ✓ ensure stub uses last matching samsam match arguments
> .callsArgAsync
> ✓ asynchronously calls argument at specified index
> .callsArgWithAsync
> ✓ asynchronously calls callback at specified index with multiple args
> .callsArgOnAsync
> ✓ asynchronously calls argument at specified index with specified context
> .callsArgOnWithAsync
> ✓ asynchronously calls argument at specified index with provided context and args
> .yieldsAsync
> ✓ asynchronously invokes only argument as callback
> .yieldsOnAsync
> ✓ asynchronously invokes only argument as callback with given context
> .yieldsToAsync
> ✓ asynchronously yields to property of object argument
> .yieldsToOnAsync
> ✓ asynchronously yields to property of object argument with given context
> .onCall
> ✓ can be used with returns to produce sequence
> ✓ can be used with returnsArg to produce sequence
> ✓ can be used with returnsThis to produce sequence
> ✓ can be used with throwsException to produce sequence
> ✓ supports chained declaration of behavior
> ✓ can be used with yields* to produce a sequence
> ✓ can be used with callsArg* to produce a sequence
> ✓ can be used with yields* and callsArg* in combination to produce a sequence
> ✓ should interact correctly with assertions (GH-231)
> in combination with withArgs
> ✓ can produce a sequence for a fake
> ✓ falls back to stub default behaviour if fake does not have its own default behaviour
> ✓ falls back to stub behaviour for call if fake does not have its own behaviour for call
> ✓ defaults to undefined behaviour once no more calls have been defined
> ✓ does not create undefined behaviour just by calling onCall
> ✓ works with fakes and reset
> ✓ throws an understandable error when trying to use withArgs on behavior
> .reset
> ✓ resets behavior
> ✓ resets call history
> .resetHistory
> ✓ resets history
> ✓ doesn't reset behavior defined using withArgs
> ✓ doesn't reset behavior
> .resetBehavior
> ✓ clears yields* and callsArg* sequence
> ✓ cleans 'returns' behavior
> ✓ cleans behavior of fakes returned by withArgs
> ✓ does not clean parents' behavior when called on a fake returned by withArgs
> ✓ cleans 'returnsArg' behavior
> ✓ cleans 'returnsThis' behavior
> ✓ cleans 'resolvesThis' behavior, so the stub does not resolve nor returns anything
> does not touch properties that are reset by 'reset'
> ✓ .calledOnce
> ✓ called multiple times
> ✓ call order state
> ✓ fakes returned by withArgs
> .length
> ✓ is zero by default
> ✓ retains function length 0
> ✓ retains function length 1
> ✓ retains function length 2
> ✓ retains function length 3
> ✓ retains function length 4
> ✓ retains function length 12
> .createStubInstance
> ✓ stubs existing methods
> ✓ throws with no methods to stub
> ✓ doesn't call the constructor
> ✓ retains non function values
> ✓ has no side effects on the prototype
> ✓ throws exception for non function params
> ✓ allows providing optional overrides
> ✓ allows providing optional returned values
> ✓ allows providing null as a return value
> ✓ throws an exception when trying to override non-existing property
> .callThrough
> ✓ does not call original function when arguments match conditional stub
> ✓ calls original function when arguments do not match conditional stub
> ✓ calls original function with same arguments when call does not match conditional stub
> ✓ calls original function with same `this` reference when call does not match conditional stub
> .callThroughWithNew
> ✓ does not call original function with new when arguments match conditional stub
> ✓ calls original function with new with same arguments when call does not match conditional stub
> .get
> ✓ allows users to stub getter functions for properties
> ✓ allows users to stub getter functions for functions
> ✓ replaces old getters
> ✓ can restore stubbed setters for functions
> ✓ can restore stubbed getters for properties
> .set
> ✓ allows users to stub setter functions for properties
> ✓ allows users to stub setter functions for functions
> ✓ replaces old setters
> ✓ can restore stubbed setters for functions
> ✓ can restore stubbed setters for properties
> .value
> ✓ allows stubbing property descriptor values
> ✓ allows restoring stubbed property descriptor values
> ✓ allows stubbing function static properties
> ✓ allows restoring function static properties
> ✓ allows stubbing object props with configurable false
> .id
> ✓ should start with 'stub#'
> .printf
> ✓ is delegated to proxy
>
> color
> when environment supports color
> bold
> ✓ should return a colored string
> cyan
> ✓ should return a colored string
> green
> ✓ should return a colored string
> red
> ✓ should return a colored string
> white
> ✓ should return a colored string
> when environment does not support color
> bold
> ✓ should return a regular string
> cyan
> ✓ should return a regular string
> green
> ✓ should return a regular string
> red
> ✓ should return a regular string
> white
> ✓ should return a regular string
>
> util/core/exportAsyncBehaviors
> for methods with names starting with 'callsArg' or 'yields'
> ✓ should create an async version
> for methods with names not starting with 'callsArg' or 'yields'
> ✓ should not add any new methods
>
> util/core/format
> ✓ formats with formatio by default
> - should configure formatio to use maximum 250 entries
> ✓ formats strings without quotes
> format.setFormatter
> ✓ sets custom formatter
> ✓ throws if custom formatter is not a function
> ✓ exposes method on sinon
>
> util/core/functionToString
> ✓ returns function's displayName property
> ✓ guesses name from last call's this object
> ✓ guesses name from any call where property can be located
>
> core/util/getConfig
> .getConfig
> ✓ gets copy of default config
> ✓ should override specified properties
>
> util/core/get-next-tick
> ✓ should use process.nextTick when available
> ✓ should use setImmediate when process.nextTick is not available
> ✓ should fallback to setTimeout
>
> util/core/next-tick
> browser environment
> - should use fallback
> modern node environment
> ✓ should use process.nextTick
> old node environment
> - should use setImmediate
>
> util/core/restore
> ✓ restores all methods of supplied object
> ✓ only restores restorable methods
> ✓ restores a single stubbed method
>
> util/core/timesInWords
> ✓ should return "once" for input of 1
> ✓ should return "twice" for input of 2
> ✓ should return "thrice" for input of 3
> ✓ should return "n times" for n larger than 3
> ✓ should return "0 times" for falsy input
>
> util/core/walk-object
> without function.name support
> ✓ should still identify functions in environments
> ✓ should work with anonymous functions
>
> util/core/walk
> ✓ should call iterator with value, key, and obj, with context as the receiver
> ✓ should work with non-enumerable properties
> ✓ should walk the prototype chain of an object
> ✓ should not invoke getters on the original receiving object
> ✓ should fall back to for..in if getOwnPropertyNames is not available
> ✓ does not walk the same property twice
>
> util/core/wrapMethod
> ✓ is function
> ✓ throws if first argument is not object
> ✓ throws if object defines property but is not function
> ✓ throws Symbol() if object defines property but is not function
> ✓ throws if object does not define property
> ✓ throws if third argument is missing
> ✓ throws if third argument is not a function or a property descriptor
> ✓ replaces object method
> ✓ replaces getter
> ✓ replaces setter
> ✓ throws if method is already wrapped
> ✓ throws Symbol if method is already wrapped
> ✓ throws if property descriptor is already wrapped
> ✓ throws if method is already a spy
> ✓ throws if Symbol method is already a spy
> ✓ mirrors function properties
> ✓ does not mirror and overwrite existing properties
> originating stack traces
> ✓ throws with stack trace showing original wrapMethod call
> in browser
> - does not throw if object is window object
> wrapped method
> ✓ defines restore method
> ✓ returns wrapper
> ✓ restore brings back original method
> wrapped prototype method
> ✓ wrap adds owned property
> ✓ restore removes owned property
>
> fakeTimers.clock
> .setTimeout
> ✓ throws if no arguments
> ✓ returns numeric id or object with numeric id
> ✓ returns unique id
> ✓ sets timers on instance
> ✓ evals non-function callbacks
> ✓ passes setTimeout parameters
> ✓ calls correct timeout on recursive tick
> .setImmediate
> ✓ returns numeric id or object with numeric id
> ✓ calls the given callback immediately
> ✓ throws if no arguments
> ✓ manages separate timers per clock instance
> ✓ passes extra parameters through to the callback
> .clearImmediate
> ✓ removes immediate callbacks
> .tick
> ✓ triggers immediately without specified delay
> ✓ does not trigger without sufficient delay
> ✓ triggers after sufficient delay
> ✓ triggers simultaneous timers
> ✓ triggers multiple simultaneous timers
> ✓ triggers multiple simultaneous timers with zero callAt
> ✓ waits after setTimeout was called
> ✓ mini integration test
> ✓ triggers even when some throw
> ✓ calls function with global object or null (strict mode) as this
> ✓ triggers in the order scheduled
> ✓ creates updated Date while ticking
> ✓ fires timer in intervals of 13
> ✓ fires timers in correct order
> ✓ triggers timeouts and intervals in the order scheduled
> ✓ does not fire canceled intervals
> ✓ passes 6 seconds
> ✓ passes 1 minute
> ✓ passes 2 hours, 34 minutes and 12 seconds
> ✓ throws for invalid format
> ✓ throws for invalid minutes
> ✓ throws for negative minutes
> ✓ treats missing argument as 0
> ✓ fires nested setTimeout calls properly
> ✓ does not silently catch exceptions
> ✓ returns the current now value
> .clearTimeout
> ✓ removes timeout
> ✓ ignores null argument
> .reset
> ✓ empties timeouts queue
> .setInterval
> ✓ throws if no arguments
> ✓ returns numeric id or object with numeric id
> ✓ returns unique id
> ✓ schedules recurring timeout
> ✓ does not schedule recurring timeout when cleared
> ✓ passes setTimeout parameters
> .date
> ✓ provides date constructor
> ✓ creates real Date objects
> ✓ creates date strings when called as function
> ✓ creates real Date objects when Date constructor is gone
> ✓ creates Date objects representing clock time
> ✓ listens to ticking clock
> ✓ creates regular date when passing timestamp
> ✓ creates regular date when passing year, month
> ✓ creates regular date when passing y, m, d
> ✓ creates regular date when passing y, m, d, h
> ✓ creates regular date when passing y, m, d, h, m
> ✓ creates regular date when passing y, m, d, h, m, s
> ✓ creates regular date when passing y, m, d, h, m, s, ms
> ✓ mirrors native Date.prototype
> ✓ supports now method if present
> ✓ mirrors parse method
> ✓ mirrors UTC method
> ✓ mirrors toUTCString method
> ✓ mirrors toString
> .now
> ✓ returns clock.now
> unsupported now
> - is undefined
> .toSource
> - is mirrored
> unsupported toSource
> ✓ is undefined
> .useFakeTimers
> ✓ returns clock object
> ✓ has clock property
> ✓ sets initial timestamp
> ✓ replaces global setTimeout
> ✓ global fake setTimeout should return id
> ✓ replaces global clearTimeout
> ✓ restores global setTimeout
> ✓ restores global clearTimeout
> ✓ replaces global setInterval
> ✓ replaces global clearInterval
> ✓ restores global setInterval
> ✓ restores global clearInterval
> ✓ restores global setImmediate
> - does not install global setImmediate
> ✓ restores global clearImmediate
> - does not install global clearImmediate
> ✓ deletes global property on restore if it was inherited onto the global object
> ✓ restores global property on restore if it is present on the global object itself
> ✓ fakes Date constructor
> ✓ fake Date constructor should mirror Date's properties
> ✓ decide on Date.now support at call-time when supported
> ✓ decide on Date.now support at call-time when unsupported
> ✓ mirrors custom Date properties
> ✓ restores Date constructor
> ✓ fakes provided methods
> ✓ resets faked methods
> ✓ does not fake methods not provided
> ✓ installs clock in advancing mode and triggers setTimeout
> ✓ installs clock in advancing mode and triggers setInterval (41ms)
> ✓ installs clock in advancing mode and triggers setImmediate
> ✓ throws on old useFakeTimers signatures
> ✓ supports a way to pass the global context
> with nextTick
> ✓ installs by default without nextTick
> ✓ installs with nextTick
>
>
> 1396 passing (1s)
> 12 pending
> 1 failing
>
> 1) issues
> #1456
> "after each" hook for "stub window innerHeight":
> TypeError: Cannot read property 'restore' of undefined
> at Context.<anonymous> (test/issues/issues-test.js:333:21)
> at callFn (/usr/share/nodejs/mocha/lib/runnable.js:395:21)
> at Hook.Runnable.run (/usr/share/nodejs/mocha/lib/runnable.js:382:7)
> at next (/usr/share/nodejs/mocha/lib/runner.js:384:10)
> at Immediate._onImmediate (/usr/share/nodejs/mocha/lib/runner.js:428:5)
>
>
>
> dh_auto_test: error: /bin/sh -e debian/tests/pkg-js/test returned exit code 1
The full build log is available from:
http://qa-logs.debian.net/2020/02/22/node-sinon_8.1.0+ds-1_unstable.log
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.
More information about the Pkg-javascript-devel
mailing list