Lines Matching defs:const
23 const common = require('../common');
24 const assert = require('assert');
25 const path = require('path');
26 const fs = require('fs');
28 const tmpdir = require('../common/tmpdir');
31 const filepath = path.join(tmpdir.path, 'write_pos.txt');
34 const cb_expected = 'write open close write open close write open close ';
37 const fileDataInitial = 'abcdefghijklmnopqrstuvwxyz';
39 const fileDataExpected_1 = 'abcdefghijklmnopqrstuvwxyz';
40 const fileDataExpected_2 = 'abcdefghij123456qrstuvwxyz';
41 const fileDataExpected_3 = 'abcdefghij\u2026\u2026qrstuvwxyz';
60 const options = {};
61 const file = fs.createWriteStream(filepath, options);
75 const fileData = fs.readFileSync(filepath, 'utf8');
89 const buffer = Buffer.from(fileDataInitial);
99 const buffer = Buffer.from('123456');
101 const options = { start: 10,
103 const file = fs.createWriteStream(filepath, options);
117 const fileData = fs.readFileSync(filepath, 'utf8');
140 const data = '\u2026\u2026'; // 3 bytes * 2 = 6 bytes in UTF-8
142 const options = { start: 10,
144 const file = fs.createWriteStream(filepath, options);
158 const fileData = fs.readFileSync(filepath, 'utf8');
180 const run_test_4 = common.mustCall(function() {
182 const fn = () => {
187 const err = {
197 const run_test_5 = common.mustCall(function() {
199 const fn = () => {
204 const err = {