1'use strict'; 2require('../common'); 3const assert = require('assert'); 4 5const { Writable } = require('stream'); 6 7{ 8 const w = new Writable(); 9 assert.strictEqual(w.writableCorked, 0); 10 w.uncork(); 11 assert.strictEqual(w.writableCorked, 0); 12 w.cork(); 13 assert.strictEqual(w.writableCorked, 1); 14 w.cork(); 15 assert.strictEqual(w.writableCorked, 2); 16 w.uncork(); 17 assert.strictEqual(w.writableCorked, 1); 18 w.uncork(); 19 assert.strictEqual(w.writableCorked, 0); 20 w.uncork(); 21 assert.strictEqual(w.writableCorked, 0); 22} 23