mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
With the old test runner we cannot have `VerifyAssertions.qlref`s for each individual test that reference a shared `VerifyAssertions.ql` in the parent directory, since it doesn't like nested tests. Instead, we have to turn `VerifyAssertions.ql` into `VerifyAssertions.qll`, and each `VerifyAsssertions.qlref` into a `VerifyAssertions.ql` that imports it. But then that doesn't work with our old directory structure, since the import path would have to contain the invalid identifier `library-tests`. As a workaround, I have moved the API graph tests into a directory without dashes in its path.
24 lines
634 B
JavaScript
24 lines
634 B
JavaScript
const util = require('util');
|
|
const EventEmitter = require('events');
|
|
|
|
function MyStream() {
|
|
EventEmitter.call(this);
|
|
}
|
|
|
|
util.inherits(MyStream, EventEmitter);
|
|
|
|
MyStream.prototype.write = (data) => this.emit('data', data);
|
|
|
|
function MyOtherStream() { /* use (instance (member MyOtherStream (member exports (module classes)))) */
|
|
EventEmitter.call(this);
|
|
}
|
|
|
|
util.inherits(MyOtherStream, EventEmitter);
|
|
|
|
MyOtherStream.prototype.write = function (data) { /* use (instance (member MyOtherStream (member exports (module classes)))) */
|
|
this.emit('data', data);
|
|
return this;
|
|
};
|
|
|
|
module.exports.MyOtherStream = MyOtherStream;
|