@cedarjs/testing 0.1.1 → 0.1.2-next.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/jest/api/jest.setup.js +1 -1
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-commented-exports/code.js +28 -0
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-commented-exports/output.js +35 -0
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-default-and-other-named-export/code.js +7 -0
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-default-and-other-named-export/output.js +6 -0
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-default-export/code.js +3 -0
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-default-export/output.js +3 -0
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-required-exports/code.js +28 -0
- package/config/jest/babelPlugins/__tests__/__fixtures__/cell/cell-with-required-exports/output.js +34 -0
- package/config/jest/babelPlugins/__tests__/__fixtures__/viteDistDir/client-build-manifest.json +59 -0
- package/config/jest/babelPlugins/__tests__/babel-plugin-redwood-cell.test.ts +11 -0
- package/config/jest/babelPlugins/babel-plugin-redwood-cell.js +142 -0
- package/config/jest/package.json +3 -0
- package/config/jest/web/jest-preset.js +2 -2
- package/config/jest/web/jest.setup.js +2 -2
- package/config/jest/web/webBabelConfig.js +16 -1
- package/dist/api/apiFunction.js +4 -30
- package/dist/api/directUrlHelpers.js +4 -39
- package/dist/api/directive.js +13 -38
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +3 -26
- package/dist/api/scenario.js +2 -26
- package/dist/cache/index.js +2 -26
- package/dist/cjs/api/apiFunction.d.ts +37 -0
- package/dist/cjs/api/apiFunction.d.ts.map +1 -0
- package/dist/cjs/api/apiFunction.js +89 -0
- package/dist/cjs/api/directUrlHelpers.d.ts +3 -0
- package/dist/cjs/api/directUrlHelpers.d.ts.map +1 -0
- package/dist/cjs/api/directUrlHelpers.js +60 -0
- package/dist/cjs/api/directive.d.ts +51 -0
- package/dist/cjs/api/directive.d.ts.map +1 -0
- package/dist/cjs/api/directive.js +77 -0
- package/dist/cjs/api/index.d.ts +4 -0
- package/dist/cjs/api/index.d.ts.map +1 -0
- package/dist/cjs/api/index.js +26 -0
- package/dist/cjs/api/scenario.d.ts +108 -0
- package/dist/cjs/api/scenario.d.ts.map +1 -0
- package/dist/cjs/api/scenario.js +30 -0
- package/dist/cjs/cache/index.d.ts +50 -0
- package/dist/cjs/cache/index.d.ts.map +1 -0
- package/dist/cjs/cache/index.js +104 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/web/MockParamsProvider.d.ts +7 -0
- package/dist/cjs/web/MockParamsProvider.d.ts.map +1 -0
- package/dist/cjs/web/MockParamsProvider.js +44 -0
- package/dist/cjs/web/MockProviders.d.ts +9 -0
- package/dist/cjs/web/MockProviders.d.ts.map +1 -0
- package/dist/cjs/web/MockProviders.js +53 -0
- package/dist/cjs/web/MockRouter.d.ts +14 -0
- package/dist/cjs/web/MockRouter.d.ts.map +1 -0
- package/dist/cjs/web/MockRouter.js +48 -0
- package/dist/cjs/web/customRender.d.ts +6 -0
- package/dist/cjs/web/customRender.d.ts.map +1 -0
- package/dist/cjs/web/customRender.js +54 -0
- package/dist/cjs/web/fileMock.d.ts +9 -0
- package/dist/cjs/web/fileMock.d.ts.map +1 -0
- package/dist/cjs/web/fileMock.js +24 -0
- package/dist/cjs/web/findCellMocks.d.ts +2 -0
- package/dist/cjs/web/findCellMocks.d.ts.map +1 -0
- package/dist/cjs/web/findCellMocks.js +45 -0
- package/dist/cjs/web/global.d.ts +6 -0
- package/dist/cjs/web/global.d.ts.map +1 -0
- package/dist/cjs/web/global.js +1 -0
- package/dist/cjs/web/index.d.ts +6 -0
- package/dist/cjs/web/index.d.ts.map +1 -0
- package/dist/cjs/web/index.js +41 -0
- package/dist/cjs/web/mockAuth.d.ts +29 -0
- package/dist/cjs/web/mockAuth.d.ts.map +1 -0
- package/dist/cjs/web/mockAuth.js +89 -0
- package/dist/cjs/web/mockRequests.d.ts +30 -0
- package/dist/cjs/web/mockRequests.d.ts.map +1 -0
- package/dist/cjs/web/mockRequests.js +139 -0
- package/dist/web/MockParamsProvider.js +7 -41
- package/dist/web/MockProviders.d.ts.map +1 -1
- package/dist/web/MockProviders.js +10 -44
- package/dist/web/MockRouter.js +10 -37
- package/dist/web/customRender.js +9 -44
- package/dist/web/fileMock.js +3 -23
- package/dist/web/findCellMocks.js +4 -38
- package/dist/web/global.d.ts +1 -1
- package/dist/web/global.d.ts.map +1 -1
- package/dist/web/global.js +0 -1
- package/dist/web/index.d.ts +4 -5
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +13 -41
- package/dist/web/mockAuth.js +12 -49
- package/dist/web/mockRequests.js +6 -37
- package/package.json +78 -14
- package/api/index.js +0 -2
- package/api/package.json +0 -4
- package/cache/index.js +0 -2
- package/cache/package.json +0 -4
- package/web/index.js +0 -2
- package/web/package.json +0 -4
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var mockAuth_exports = {};
|
|
31
|
+
__export(mockAuth_exports, {
|
|
32
|
+
createAuthentication: () => createAuthentication,
|
|
33
|
+
useAuth: () => useAuth
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(mockAuth_exports);
|
|
36
|
+
var import_react = __toESM(require("react"), 1);
|
|
37
|
+
__reExport(mockAuth_exports, require("@cedarjs/auth"), module.exports);
|
|
38
|
+
var import_mockRequests = require("./mockRequests.js");
|
|
39
|
+
const AuthProvider = ({ children }) => {
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, children);
|
|
41
|
+
};
|
|
42
|
+
function makeArray(input) {
|
|
43
|
+
return !input ? [] : Array.isArray(input) ? input : [input];
|
|
44
|
+
}
|
|
45
|
+
function useAuth() {
|
|
46
|
+
return {
|
|
47
|
+
loading: false,
|
|
48
|
+
isAuthenticated: !!import_mockRequests.mockedUserMeta.currentUser,
|
|
49
|
+
logIn: async () => {
|
|
50
|
+
},
|
|
51
|
+
logOut: async () => {
|
|
52
|
+
},
|
|
53
|
+
signUp: async () => {
|
|
54
|
+
},
|
|
55
|
+
currentUser: import_mockRequests.mockedUserMeta.currentUser,
|
|
56
|
+
userMetadata: import_mockRequests.mockedUserMeta.currentUser,
|
|
57
|
+
getToken: async () => null,
|
|
58
|
+
getCurrentUser: async () => import_mockRequests.mockedUserMeta.currentUser,
|
|
59
|
+
hasRole: (roles) => {
|
|
60
|
+
const currentUserRoles = makeArray(
|
|
61
|
+
import_mockRequests.mockedUserMeta.currentUser?.roles
|
|
62
|
+
);
|
|
63
|
+
if (currentUserRoles) {
|
|
64
|
+
return makeArray(roles).some((role) => currentUserRoles.includes(role));
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
},
|
|
68
|
+
reauthenticate: async () => {
|
|
69
|
+
},
|
|
70
|
+
forgotPassword: async () => {
|
|
71
|
+
},
|
|
72
|
+
resetPassword: async () => {
|
|
73
|
+
},
|
|
74
|
+
validateResetToken: async () => {
|
|
75
|
+
},
|
|
76
|
+
type: "default",
|
|
77
|
+
client: void 0,
|
|
78
|
+
hasError: false
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const createAuthentication = () => {
|
|
82
|
+
return { AuthProvider, useAuth };
|
|
83
|
+
};
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
createAuthentication,
|
|
87
|
+
useAuth,
|
|
88
|
+
...require("@cedarjs/auth")
|
|
89
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { StartOptions as StartMSWWorkerOptions, SharedOptions as SharedMSWOptions, MockedResponse, DefaultBodyType, RequestHandler, GraphQLContext, GraphQLRequest, ResponseTransformer } from 'msw';
|
|
2
|
+
/**
|
|
3
|
+
* Plugs fetch for the correct target in order to capture requests.
|
|
4
|
+
*
|
|
5
|
+
* Request handlers can be registered lazily (via `mockGraphQL<Query|Mutation>`),
|
|
6
|
+
* the queue will be drained and used.
|
|
7
|
+
*/
|
|
8
|
+
type StartOptions<Target> = Target extends 'browsers' ? StartMSWWorkerOptions : SharedMSWOptions;
|
|
9
|
+
export declare const startMSW: <Target extends "node" | "browsers">(target: Target, options?: StartOptions<Target>) => Promise<any>;
|
|
10
|
+
export declare const setupRequestHandlers: () => void;
|
|
11
|
+
export declare const closeServer: () => void;
|
|
12
|
+
export declare const registerHandler: (handler: RequestHandler) => void;
|
|
13
|
+
export type DataFunction<Query extends Record<string, unknown> = Record<string, unknown>, QueryVariables = Record<string, any>> = (variables: QueryVariables, { req, ctx, }: {
|
|
14
|
+
req: GraphQLRequest<any>;
|
|
15
|
+
ctx: GraphQLContext<Record<string, any>>;
|
|
16
|
+
}) => Query | void;
|
|
17
|
+
type ResponseFunction<BodyType extends DefaultBodyType = any> = (...transformers: ResponseTransformer<BodyType>[]) => MockedResponse<BodyType>;
|
|
18
|
+
type ResponseEnhancers = {
|
|
19
|
+
once: ResponseFunction<any>;
|
|
20
|
+
networkError: (message: string) => void;
|
|
21
|
+
};
|
|
22
|
+
type ResponseEnhancer = keyof ResponseEnhancers;
|
|
23
|
+
export declare const mockGraphQLQuery: <Query extends Record<string, unknown> = Record<string, unknown>, QueryVariables = Record<string, any>>(operation: string, data: DataFunction<Query, QueryVariables> | Query, responseEnhancer?: ResponseEnhancer) => Record<string, any> | DataFunction<Record<string, unknown>, Record<string, any>>;
|
|
24
|
+
export declare const mockGraphQLMutation: <Query extends Record<string, unknown> = Record<string, unknown>, QueryVariables = Record<string, any>>(operation: string, data: DataFunction<Query, QueryVariables> | Query, responseEnhancer?: ResponseEnhancer) => Record<string, any> | DataFunction<Record<string, unknown>, Record<string, any>>;
|
|
25
|
+
export declare const mockedUserMeta: {
|
|
26
|
+
currentUser: Record<string, unknown> | null;
|
|
27
|
+
};
|
|
28
|
+
export declare const mockCurrentUser: (user: Record<string, unknown> | null) => void;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=mockRequests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockRequests.d.ts","sourceRoot":"","sources":["../../../src/web/mockRequests.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,IAAI,qBAAqB,EACrC,aAAa,IAAI,gBAAgB,EACjC,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EAGpB,MAAM,KAAK,CAAA;AAQZ;;;;;GAKG;AAEH,KAAK,YAAY,CAAC,MAAM,IAAI,MAAM,SAAS,UAAU,GACjD,qBAAqB,GACrB,gBAAgB,CAAA;AACpB,eAAO,MAAM,QAAQ,GAAU,MAAM,SAAS,MAAM,GAAG,UAAU,UACvD,MAAM,YACJ,YAAY,CAAC,MAAM,CAAC,iBAgB/B,CAAA;AAED,eAAO,MAAM,oBAAoB,YAMhC,CAAA;AAED,eAAO,MAAM,WAAW,YAEvB,CAAA;AAED,eAAO,MAAM,eAAe,YAAa,cAAc,SAQtD,CAAA;AAED,MAAM,MAAM,YAAY,CACtB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/D,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC,CACF,SAAS,EAAE,cAAc,EACzB,EACE,GAAG,EACH,GAAG,GACJ,EAAE;IACD,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;IACxB,GAAG,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;CACzC,KACE,KAAK,GAAG,IAAI,CAAA;AAGjB,KAAK,gBAAgB,CAAC,QAAQ,SAAS,eAAe,GAAG,GAAG,IAAI,CAC9D,GAAG,YAAY,EAAE,mBAAmB,CAAC,QAAQ,CAAC,EAAE,KAC7C,cAAc,CAAC,QAAQ,CAAC,CAAA;AAE7B,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAC3B,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC,CAAA;AACD,KAAK,gBAAgB,GAAG,MAAM,iBAAiB,CAAA;AAuD/C,eAAO,MAAM,gBAAgB,GAC3B,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,4BACrC,cAAc,mCAEH,MAAM,QACX,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,KAAK,qBAC9B,gBAAgB,qFAGpC,CAAA;AAED,eAAO,MAAM,mBAAmB,GAC9B,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,4BACrC,cAAc,mCAEH,MAAM,QACX,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,KAAK,qBAC9B,gBAAgB,qFAGpC,CAAA;AAED,eAAO,MAAM,cAAc,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAEzE,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,SASnE,CAAA"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var mockRequests_exports = {};
|
|
30
|
+
__export(mockRequests_exports, {
|
|
31
|
+
closeServer: () => closeServer,
|
|
32
|
+
mockCurrentUser: () => mockCurrentUser,
|
|
33
|
+
mockGraphQLMutation: () => mockGraphQLMutation,
|
|
34
|
+
mockGraphQLQuery: () => mockGraphQLQuery,
|
|
35
|
+
mockedUserMeta: () => mockedUserMeta,
|
|
36
|
+
registerHandler: () => registerHandler,
|
|
37
|
+
setupRequestHandlers: () => setupRequestHandlers,
|
|
38
|
+
startMSW: () => startMSW
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(mockRequests_exports);
|
|
41
|
+
var import_msw = require("msw");
|
|
42
|
+
let REQUEST_HANDLER_QUEUE = [];
|
|
43
|
+
let SERVER_INSTANCE;
|
|
44
|
+
const startMSW = async (target, options) => {
|
|
45
|
+
if (SERVER_INSTANCE) {
|
|
46
|
+
return SERVER_INSTANCE;
|
|
47
|
+
}
|
|
48
|
+
if (target === "browsers") {
|
|
49
|
+
SERVER_INSTANCE = (0, import_msw.setupWorker)();
|
|
50
|
+
await SERVER_INSTANCE.start(options);
|
|
51
|
+
} else {
|
|
52
|
+
const { setupServer } = require("msw/node");
|
|
53
|
+
SERVER_INSTANCE = setupServer();
|
|
54
|
+
await SERVER_INSTANCE.listen(options);
|
|
55
|
+
}
|
|
56
|
+
return SERVER_INSTANCE;
|
|
57
|
+
};
|
|
58
|
+
const setupRequestHandlers = () => {
|
|
59
|
+
SERVER_INSTANCE.resetHandlers();
|
|
60
|
+
for (const handler of REQUEST_HANDLER_QUEUE) {
|
|
61
|
+
SERVER_INSTANCE.use(handler);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const closeServer = () => {
|
|
65
|
+
SERVER_INSTANCE.close();
|
|
66
|
+
};
|
|
67
|
+
const registerHandler = (handler) => {
|
|
68
|
+
if (!SERVER_INSTANCE) {
|
|
69
|
+
REQUEST_HANDLER_QUEUE = [...REQUEST_HANDLER_QUEUE, handler];
|
|
70
|
+
} else {
|
|
71
|
+
SERVER_INSTANCE.use(handler);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const mockGraphQL = (type, operation, data, responseEnhancer) => {
|
|
75
|
+
const resolver = (req, res, ctx) => {
|
|
76
|
+
let d = data;
|
|
77
|
+
let responseTransforms = [];
|
|
78
|
+
if (typeof data === "function") {
|
|
79
|
+
const captureTransform = (fn) => {
|
|
80
|
+
return (...args) => {
|
|
81
|
+
const resTransform = fn(...args);
|
|
82
|
+
responseTransforms = [...responseTransforms, resTransform];
|
|
83
|
+
return resTransform;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
const newCtx = {
|
|
87
|
+
status: captureTransform(ctx.status),
|
|
88
|
+
delay: captureTransform(ctx.delay),
|
|
89
|
+
errors: captureTransform(ctx.errors),
|
|
90
|
+
set: captureTransform(ctx.set),
|
|
91
|
+
fetch: captureTransform(ctx.fetch),
|
|
92
|
+
data: captureTransform(ctx.data),
|
|
93
|
+
extensions: captureTransform(ctx.extensions),
|
|
94
|
+
cookie: captureTransform(ctx.cookie),
|
|
95
|
+
field: captureTransform(ctx.field)
|
|
96
|
+
};
|
|
97
|
+
d = data(req.variables, {
|
|
98
|
+
req,
|
|
99
|
+
ctx: newCtx
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return (responseEnhancer ? res[responseEnhancer] : res)(
|
|
103
|
+
ctx.data(d),
|
|
104
|
+
...responseTransforms
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
registerHandler(import_msw.graphql[type](operation, resolver));
|
|
108
|
+
return data;
|
|
109
|
+
};
|
|
110
|
+
const mockGraphQLQuery = (operation, data, responseEnhancer) => {
|
|
111
|
+
return mockGraphQL("query", operation, data, responseEnhancer);
|
|
112
|
+
};
|
|
113
|
+
const mockGraphQLMutation = (operation, data, responseEnhancer) => {
|
|
114
|
+
return mockGraphQL("mutation", operation, data, responseEnhancer);
|
|
115
|
+
};
|
|
116
|
+
const mockedUserMeta = {
|
|
117
|
+
currentUser: null
|
|
118
|
+
};
|
|
119
|
+
const mockCurrentUser = (user) => {
|
|
120
|
+
mockedUserMeta.currentUser = user;
|
|
121
|
+
mockGraphQLQuery("__REDWOOD__AUTH_GET_CURRENT_USER", () => {
|
|
122
|
+
return {
|
|
123
|
+
redwood: {
|
|
124
|
+
currentUser: user
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
130
|
+
0 && (module.exports = {
|
|
131
|
+
closeServer,
|
|
132
|
+
mockCurrentUser,
|
|
133
|
+
mockGraphQLMutation,
|
|
134
|
+
mockGraphQLQuery,
|
|
135
|
+
mockedUserMeta,
|
|
136
|
+
registerHandler,
|
|
137
|
+
setupRequestHandlers,
|
|
138
|
+
startMSW
|
|
139
|
+
});
|
|
@@ -1,44 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var MockParamsProvider_exports = {};
|
|
30
|
-
__export(MockParamsProvider_exports, {
|
|
31
|
-
MockParamsProvider: () => MockParamsProvider
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(MockParamsProvider_exports);
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_router = require("@cedarjs/router");
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useLocation, ParamsContext, parseSearch } from "@cedarjs/router";
|
|
36
3
|
const MockParamsProvider = ({ children }) => {
|
|
37
|
-
const location =
|
|
38
|
-
const searchParams =
|
|
39
|
-
return /* @__PURE__ */
|
|
4
|
+
const location = useLocation();
|
|
5
|
+
const searchParams = parseSearch(location.search);
|
|
6
|
+
return /* @__PURE__ */ React.createElement(ParamsContext.Provider, { value: { params: { ...searchParams } } }, children);
|
|
40
7
|
};
|
|
41
|
-
|
|
42
|
-
0 && (module.exports = {
|
|
8
|
+
export {
|
|
43
9
|
MockParamsProvider
|
|
44
|
-
}
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockProviders.d.ts","sourceRoot":"","sources":["../../src/web/MockProviders.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"MockProviders.d.ts","sourceRoot":"","sources":["../../src/web/MockProviders.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAuBzB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAWA,CAAA"}
|
|
@@ -1,53 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var MockProviders_exports = {};
|
|
30
|
-
__export(MockProviders_exports, {
|
|
31
|
-
MockProviders: () => MockProviders
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(MockProviders_exports);
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_auth = require("@cedarjs/auth");
|
|
36
|
-
var import_router = require("@cedarjs/router");
|
|
37
|
-
var import_web = require("@cedarjs/web");
|
|
38
|
-
var import_apollo = require("@cedarjs/web/apollo");
|
|
39
|
-
var import_MockParamsProvider = require("./MockParamsProvider");
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LocationProvider } from "@cedarjs/router";
|
|
3
|
+
import { RedwoodProvider } from "@cedarjs/web";
|
|
4
|
+
import { RedwoodApolloProvider } from "@cedarjs/web/apollo";
|
|
5
|
+
import { useAuth } from "./mockAuth.js";
|
|
6
|
+
import { MockParamsProvider } from "./MockParamsProvider.js";
|
|
40
7
|
let UserRoutes;
|
|
41
8
|
try {
|
|
42
9
|
const userRoutesModule = require("~__REDWOOD__USER_ROUTES_FOR_MOCK");
|
|
43
10
|
UserRoutes = userRoutesModule.default;
|
|
44
11
|
} catch {
|
|
45
|
-
UserRoutes = () => /* @__PURE__ */
|
|
12
|
+
UserRoutes = () => /* @__PURE__ */ React.createElement(React.Fragment, null);
|
|
46
13
|
}
|
|
47
14
|
const MockProviders = ({ children }) => {
|
|
48
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ React.createElement(RedwoodProvider, { titleTemplate: "%PageTitle | %AppTitle" }, /* @__PURE__ */ React.createElement(RedwoodApolloProvider, { useAuth }, /* @__PURE__ */ React.createElement(UserRoutes, null), /* @__PURE__ */ React.createElement(LocationProvider, null, /* @__PURE__ */ React.createElement(MockParamsProvider, null, children))));
|
|
49
16
|
};
|
|
50
|
-
|
|
51
|
-
0 && (module.exports = {
|
|
17
|
+
export {
|
|
52
18
|
MockProviders
|
|
53
|
-
}
|
|
19
|
+
};
|
package/dist/web/MockRouter.js
CHANGED
|
@@ -1,48 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var MockRouter_exports = {};
|
|
21
|
-
__export(MockRouter_exports, {
|
|
22
|
-
Router: () => Router,
|
|
23
|
-
routes: () => routes
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(MockRouter_exports);
|
|
26
|
-
var import_react_util = require("@cedarjs/router/dist/react-util");
|
|
27
|
-
var import_route_validators = require("@cedarjs/router/dist/route-validators");
|
|
28
|
-
var import_util = require("@cedarjs/router/dist/util");
|
|
29
|
-
__reExport(MockRouter_exports, require("@cedarjs/router/dist/index"), module.exports);
|
|
1
|
+
import { flattenAll } from "@cedarjs/router/dist/react-util";
|
|
2
|
+
import { isValidRoute } from "@cedarjs/router/dist/route-validators";
|
|
3
|
+
import { replaceParams } from "@cedarjs/router/dist/util";
|
|
4
|
+
export * from "@cedarjs/router/dist/index";
|
|
30
5
|
const routes = {};
|
|
31
6
|
const Router = ({ children }) => {
|
|
32
|
-
const flatChildArray =
|
|
7
|
+
const flatChildArray = flattenAll(children);
|
|
33
8
|
flatChildArray.forEach((child) => {
|
|
34
|
-
if (
|
|
9
|
+
if (isValidRoute(child)) {
|
|
35
10
|
const { name, path } = child.props;
|
|
36
11
|
if (name && path) {
|
|
37
|
-
routes[name] = (args = {}) =>
|
|
12
|
+
routes[name] = (args = {}) => replaceParams(path, args);
|
|
38
13
|
}
|
|
39
14
|
}
|
|
40
15
|
});
|
|
41
16
|
return null;
|
|
42
17
|
};
|
|
43
|
-
|
|
44
|
-
0 && (module.exports = {
|
|
18
|
+
export {
|
|
45
19
|
Router,
|
|
46
|
-
routes
|
|
47
|
-
|
|
48
|
-
});
|
|
20
|
+
routes
|
|
21
|
+
};
|
package/dist/web/customRender.js
CHANGED
|
@@ -1,54 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var customRender_exports = {};
|
|
30
|
-
__export(customRender_exports, {
|
|
31
|
-
customRender: () => customRender,
|
|
32
|
-
customRenderHook: () => customRenderHook
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(customRender_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_react2 = require("@testing-library/react");
|
|
37
|
-
var import_MockProviders = require("./MockProviders");
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render, renderHook } from "@testing-library/react";
|
|
3
|
+
import { MockProviders } from "./MockProviders.js";
|
|
38
4
|
const customRender = (ui, options = {}) => {
|
|
39
|
-
return
|
|
40
|
-
wrapper: (props) => /* @__PURE__ */
|
|
5
|
+
return render(ui, {
|
|
6
|
+
wrapper: (props) => /* @__PURE__ */ React.createElement(MockProviders, { ...props }),
|
|
41
7
|
...options
|
|
42
8
|
});
|
|
43
9
|
};
|
|
44
10
|
const customRenderHook = (render2, options) => {
|
|
45
|
-
return
|
|
46
|
-
wrapper: (props) => /* @__PURE__ */
|
|
11
|
+
return renderHook(render2, {
|
|
12
|
+
wrapper: (props) => /* @__PURE__ */ React.createElement(MockProviders, { ...props }),
|
|
47
13
|
...options
|
|
48
14
|
});
|
|
49
15
|
};
|
|
50
|
-
|
|
51
|
-
0 && (module.exports = {
|
|
16
|
+
export {
|
|
52
17
|
customRender,
|
|
53
18
|
customRenderHook
|
|
54
|
-
}
|
|
19
|
+
};
|
package/dist/web/fileMock.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var fileMock_exports = {};
|
|
20
|
-
__export(fileMock_exports, {
|
|
21
|
-
default: () => fileMock_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(fileMock_exports);
|
|
24
1
|
var fileMock_default = "fileMock";
|
|
2
|
+
export {
|
|
3
|
+
fileMock_default as default
|
|
4
|
+
};
|
|
@@ -1,45 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var findCellMocks_exports = {};
|
|
30
|
-
__export(findCellMocks_exports, {
|
|
31
|
-
findCellMocks: () => findCellMocks
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(findCellMocks_exports);
|
|
34
|
-
var import_fast_glob = __toESM(require("fast-glob"));
|
|
1
|
+
import fg from "fast-glob";
|
|
35
2
|
const findCellMocks = (webBasePath) => {
|
|
36
|
-
return
|
|
3
|
+
return fg.sync("**/*Cell/*.mock.{js,ts,jsx,tsx}", {
|
|
37
4
|
cwd: webBasePath,
|
|
38
5
|
ignore: ["node_modules"],
|
|
39
6
|
absolute: true
|
|
40
7
|
});
|
|
41
8
|
};
|
|
42
|
-
|
|
43
|
-
0 && (module.exports = {
|
|
9
|
+
export {
|
|
44
10
|
findCellMocks
|
|
45
|
-
}
|
|
11
|
+
};
|
package/dist/web/global.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { mockGraphQLQuery as _mockGraphQLQuery, mockGraphQLMutation as _mockGraphQLMutation } from './mockRequests';
|
|
1
|
+
import type { mockGraphQLQuery as _mockGraphQLQuery, mockGraphQLMutation as _mockGraphQLMutation } from './mockRequests.js';
|
|
2
2
|
declare global {
|
|
3
3
|
const mockGraphQLQuery: typeof _mockGraphQLQuery;
|
|
4
4
|
const mockGraphQLMutation: typeof _mockGraphQLMutation;
|
package/dist/web/global.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/web/global.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,IAAI,iBAAiB,EACrC,mBAAmB,IAAI,oBAAoB,EAC5C,MAAM,
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/web/global.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,IAAI,iBAAiB,EACrC,mBAAmB,IAAI,oBAAoB,EAC5C,MAAM,mBAAmB,CAAA;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,MAAM,gBAAgB,EAAE,OAAO,iBAAiB,CAAA;IAChD,MAAM,mBAAmB,EAAE,OAAO,oBAAoB,CAAA;CAGvD"}
|
package/dist/web/global.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/web/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import './global';
|
|
2
1
|
export * from '@testing-library/react';
|
|
3
|
-
export { customRender as render, customRenderHook as renderHook, } from './customRender';
|
|
4
|
-
export { MockProviders } from './MockProviders';
|
|
5
|
-
export { useAuth } from './mockAuth';
|
|
6
|
-
export * from './mockRequests';
|
|
2
|
+
export { customRender as render, customRenderHook as renderHook, } from './customRender.js';
|
|
3
|
+
export { MockProviders } from './MockProviders.js';
|
|
4
|
+
export { useAuth } from './mockAuth.js';
|
|
5
|
+
export * from './mockRequests.js';
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/web/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AAGtC,OAAO,EACL,YAAY,IAAI,MAAM,EACtB,gBAAgB,IAAI,UAAU,GAC/B,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,cAAc,mBAAmB,CAAA"}
|