@@ -14,7 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
jest.mock('./helpers');
|
||||
jest.mock('@backstage/plugin-scaffolder-node', () => {
|
||||
const actual = jest.requireActual('@backstage/plugin-scaffolder-node');
|
||||
return { ...actual, fetchContents: jest.fn() };
|
||||
});
|
||||
|
||||
import os from 'os';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
jest.mock('./helpers');
|
||||
jest.mock('@backstage/plugin-scaffolder-node', () => {
|
||||
const actual = jest.requireActual('@backstage/plugin-scaffolder-node');
|
||||
return { ...actual, fetchFile: jest.fn() };
|
||||
});
|
||||
|
||||
import os from 'os';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
jest.mock('@backstage/plugin-scaffolder-node', () => {
|
||||
const actual = jest.requireActual('@backstage/plugin-scaffolder-node');
|
||||
return { ...actual, fetchContents: jest.fn() };
|
||||
});
|
||||
|
||||
import os from 'os';
|
||||
import { join as joinPath, sep as pathSep } from 'path';
|
||||
import fs from 'fs-extra';
|
||||
@@ -32,10 +37,6 @@ import {
|
||||
TemplateAction,
|
||||
} from '@backstage/plugin-scaffolder-node';
|
||||
|
||||
jest.mock('./helpers', () => ({
|
||||
fetchContents: jest.fn(),
|
||||
}));
|
||||
|
||||
type FetchTemplateInput = ReturnType<
|
||||
typeof createFetchTemplateAction
|
||||
> extends TemplateAction<infer U>
|
||||
|
||||
Reference in New Issue
Block a user