From 5fb8462f663a5588030e987ef014f0374e847626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierrick=20Boul=C3=A9?= Date: Fri, 17 Nov 2023 23:39:22 +0100 Subject: [PATCH] Use npmcli config in asyncapi generator --- test/__mocks__/@npmcli/config.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/__mocks__/@npmcli/config.js diff --git a/test/__mocks__/@npmcli/config.js b/test/__mocks__/@npmcli/config.js new file mode 100644 index 0000000000..c0cae96c8d --- /dev/null +++ b/test/__mocks__/@npmcli/config.js @@ -0,0 +1,9 @@ +const config = jest.genMockFromModule('@npmcli/config'); + +config.prototype[Symbol.for('resolvedAdd')] = [{name: 'test'}]; + +config.prototype.load = jest.fn(async (opt) => { + return; +}); + +module.exports = config; \ No newline at end of file