Bump artifact dependencies if CODEQL_ACTION_ARTIFACT_V2_UPGRADE enabled (#2482)

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
Co-authored-by: Henry Mercer <henrymercer@github.com>
This commit is contained in:
Angela P Wen 2024-10-01 09:59:05 -07:00 committed by GitHub
parent cf5b0a9041
commit a196a714b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5388 changed files with 2176737 additions and 71701 deletions

59
node_modules/lazystream/test/writable_test.js generated vendored Normal file
View file

@ -0,0 +1,59 @@
var Writable = require('../lib/lazystream').Writable;
var DummyWritable = require('./helper').DummyWritable;
exports.writable = {
options: function(test) {
test.expect(3);
var writable = new Writable(function(options) {
test.ok(this instanceof Writable, "Writable should bind itself to callback's this");
test.equal(options.encoding, "utf-8", "Writable should make options accessible to callback");
this.ok = true;
return new DummyWritable([]);
}, {encoding: "utf-8"});
writable.write("test");
test.ok(writable.ok);
test.done();
},
dummy: function(test) {
var expected = [ 'line1\n', 'line2\n' ];
var actual = [];
test.expect(0);
var dummy = new DummyWritable(actual);
expected.forEach(function(item) {
dummy.write(new Buffer(item));
});
test.done();
},
streams2: function(test) {
var expected = [ 'line1\n', 'line2\n' ];
var actual = [];
var instantiated = false;
test.expect(2);
var writable = new Writable(function() {
instantiated = true;
return new DummyWritable(actual);
});
test.equal(instantiated, false, 'DummyWritable should only be instantiated when it is needed');
writable.on('end', function() {
test.equal(actual.join(''), expected.join(''), 'Writable should not change the data of the underlying stream');
test.done();
});
expected.forEach(function(item) {
writable.write(new Buffer(item));
});
writable.end();
}
};