| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4aedde8 commit cfd1b19
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,13 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + require('../common'); | ||
| 3 | + | ||
| 4 | + const assert = require('assert'); | ||
| 5 | + const fs = require('fs'); | ||
| 6 | + | ||
| 7 | + const encoding = 'foo-8'; | ||
| 8 | + const filename = 'bar.txt'; | ||
| 9 | + | ||
| 10 | + assert.throws( | ||
| 11 | + fs.readFile.bind(fs, filename, { encoding }, () => {}), | ||
| 12 | + new RegExp(`Error: Unknown encoding: ${encoding}$`) | ||
| 13 | + ); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments