• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../common');
4const assert = require('assert');
5const fs = require('fs');
6
7const encoding = 'foo-8';
8const filename = 'bar.txt';
9assert.throws(
10  () => fs.readFile(filename, { encoding }, common.mustNotCall()),
11  { code: 'ERR_INVALID_OPT_VALUE_ENCODING', name: 'TypeError' }
12);
13