- Create a gist if you haven't already.
- Clone your gist:
# make sure to replace `<hash>` with your gist's hash git clone https://gist.github.com/<hash>.git # with https git clone [email protected]:<hash>.git # or with ssh
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
'use strict'; | |
const sinon = require( 'sinon' ); | |
const expect = require( 'chai' ).expect; | |
describe( 'Array.prototype', () => { | |
describe( 'map()', () => { | |
it( 'uses native map', () => { | |
const callback = sinon.spy(); | |
const stub = sinon.stub( Array.prototype, 'map' ).returns( [ 2, 4 ] ); |