Skip to content

Commit

Permalink
test: add missing unknown cases
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-go committed Aug 30, 2022
1 parent 3f4d521 commit 9294aff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/addons/parse-encoding/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const common = require('../../common');
const assert = require('assert');
const { parseEncoding } = require(`./build/${common.buildType}/binding`);


assert.strictEqual(parseEncoding('ascii'), 'ASCII');
assert.strictEqual(parseEncoding('ASCII'), 'ASCII');
assert.strictEqual(parseEncoding('base64'), 'BASE64');
Expand Down Expand Up @@ -39,6 +40,8 @@ assert.strictEqual(parseEncoding('UTF-16LE'), 'UCS2');

// unknown cases
assert.strictEqual(parseEncoding(''), 'UNKNOWN');
assert.strictEqual(parseEncoding('asCOO'), 'UNKNOWN');
assert.strictEqual(parseEncoding('hux'), 'UNKNOWN');
assert.strictEqual(parseEncoding('utf-buffer'), 'UNKNOWN');
assert.strictEqual(parseEncoding('utf-16leNOT'), 'UNKNOWN');
assert.strictEqual(parseEncoding('linary'), 'UNKNOWN');
Expand Down

0 comments on commit 9294aff

Please sign in to comment.