Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created February 18, 2021 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/e946cb2cd86b42f74d6308990178ea41 to your computer and use it in GitHub Desktop.
Save isaacs/e946cb2cd86b42f74d6308990178ea41 to your computer and use it in GitHub Desktop.
const fs = require('fs')
const found = Buffer.concat([
fs.readFileSync(__filename),
Buffer.from('asdf'),
Buffer.from('foo'),
fs.readFileSync(__filename),
])
const wanted = Buffer.concat([
fs.readFileSync(__filename),
Buffer.from('foo'),
Buffer.from('asdf'),
fs.readFileSync(__filename),
])
const t = require('./')
t.same(found, wanted, 'got the right buffer')
t.same(found.toString(), wanted.toString(), 'got the right string')
@isaacs
Copy link
Author

isaacs commented Feb 18, 2021

With tap v14:

Screen Shot 2021-02-17 at 18 18 05

With tap v15:

Screen Shot 2021-02-17 at 18 18 19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment