-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #41478 Fixes: #41450 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
- Loading branch information
1 parent
44b6927
commit 14bb6f9
Showing
3 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
|
||
const { strictEqual, throws } = require('assert'); | ||
const buffer = require('buffer'); | ||
|
||
// Exported on the global object | ||
strictEqual(globalThis.atob, buffer.atob); | ||
strictEqual(globalThis.btoa, buffer.btoa); | ||
|
||
// Throws type error on no argument passed | ||
throws(() => buffer.atob(), /TypeError/); | ||
throws(() => buffer.btoa(), /TypeError/); |