From d27357de558c3272341e252c3acc010d38edeb0f Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 2 Feb 2024 15:10:43 -0800 Subject: [PATCH] [Tests] add coverage --- .eslintrc | 4 ++++ test/index.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.eslintrc b/.eslintrc index 3b5d9e9..fe2fefe 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,4 +2,8 @@ "root": true, "extends": "@ljharb", + + "globals": { + "DataView": false, + }, } diff --git a/test/index.js b/test/index.js index 3a4107a..fb328d1 100644 --- a/test/index.js +++ b/test/index.js @@ -19,6 +19,9 @@ test('byteLength', function (t) { var ab0 = new ArrayBuffer(0); st.equal(byteLength(ab0), 0, 'works on an ArrayBuffer of length 0: ' + inspect(ab0)); + var dv = new DataView(ab32); + st.equal(byteLength(dv), NaN, 'a DataView returns NaN'); + st.end(); });