Created
February 18, 2021 02:18
-
-
Save isaacs/e946cb2cd86b42f74d6308990178ea41 to your computer and use it in GitHub Desktop.
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
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') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With tap v14:
With tap v15: