We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7d4dd0 commit b6d8917Copy full SHA for b6d8917
1 file changed
x-pack/platform/plugins/shared/sample_data_ingest/server/services/artifact_manager/utils/download.test.ts
@@ -32,6 +32,18 @@ jest.mock('stream/promises', () => ({
32
pipeline: jest.fn(),
33
}));
34
35
+// Mock Readable.fromWeb to return the mock body directly since pipeline is already mocked
36
+jest.mock('stream', () => {
37
+ const actual = jest.requireActual('stream');
38
+ return {
39
+ ...actual,
40
+ Readable: {
41
+ ...actual.Readable,
42
+ fromWeb: jest.fn((webStream) => webStream),
43
+ },
44
+ };
45
+});
46
+
47
const fetchMock = jest.spyOn(global, 'fetch');
48
49
describe('download', () => {
0 commit comments