@elliemae/ds-test-utils 3.16.0-next.11 → 3.16.0-next.13

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/dist/cjs/index.js CHANGED
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
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.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { toHaveNoViolations, makeDSVirtualListTesteable, undoDSVirtualListTesteable } from './testeable-utils/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAA2F;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAA2F;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
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.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/testeable-utils/DSVirtualList.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-var-requires */\n/* eslint-disable import/namespace */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\nimport * as virtualLib from '@tanstack/react-virtual';\n// this mutableScope thing may be over-kill\n// better safe than sorry?\nconst mutableScope = { original: virtualLib.useVirtualizer };\n\ntype MakeTesteableParams = {\n overscan: number;\n itemHeight: number;\n parentHeight: number;\n width?: number;\n};\n\nexport const makeDSVirtualListTesteable = async ({\n overscan,\n itemHeight,\n parentHeight,\n width = 400,\n}: MakeTesteableParams): void => {\n // await import is used to avoid \"read-only\" imports at global level\n // which would prevent run-time monekey-patching\n const lib = await import('@tanstack/react-virtual');\n lib.useVirtualizer = jest.fn((virtualOpts: Parameters<virtualLib.originalUseVirtualizer>) =>\n mutableScope.original({\n ...virtualOpts,\n overscan,\n initialRect: { height: parentHeight, width },\n observeElementRect: (_, cb) => {\n cb({ height: parentHeight, width });\n },\n measureElement: () => itemHeight,\n }),\n );\n};\n\nexport const undoDSVirtualListTesteable = async () => {\n // await import is used to avoid \"read-only\" imports at global level\n // which would prevent run-time monekey-patching\n const lib = await import('@tanstack/react-virtual');\n lib.useVirtualizer = mutableScope.original;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADMvB,iBAA4B;AAG5B,MAAM,eAAe,EAAE,UAAU,WAAW,eAAe;AASpD,MAAM,6BAA6B,OAAO;AAAA,EAC/C;AAAA,EACA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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.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/testeable-utils/axe-core/getMessageAndPass.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type { Result } from 'axe-core';\nimport { matcherHint } from 'jest-matcher-utils';\nimport { reporter } from './reporter.js';\n\nexport const getMessageAndPass = (violations: Result[]) => {\n const formatedViolations = reporter(violations);\n const pass = formatedViolations.length === 0;\n if (pass) return { message: () => '', pass };\n return { message: () => `${matcherHint('.toHaveNoViolations')}\\n\\n${formatedViolations}`, pass };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,gCAA4B;AAC5B,sBAAyB;AAElB,MAAM,oBAAoB,CAAC,eAAyB;AACzD,QAAM,yBAAqB,0BAAS,UAAU;AAC9C,QAAM,OAAO,mBAAmB,WAAW;AAC3C,MAAI;AAAM,WAAO,EAAE,SAAS,MAAM,IAAI,KAAK;AAC3C,SAAO,EAAE,SAAS,MAAM,OAAG,uCAAY,qBAAqB;AAAA;AAAA,EAAQ,sBAAsB,KAAK;AACjG;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,gCAA4B;AAC5B,sBAAyB;AAElB,MAAM,oBAAoB,CAAC,eAAyB;AACzD,QAAM,yBAAqB,0BAAS,UAAU;AAC9C,QAAM,OAAO,mBAAmB,WAAW;AAC3C,MAAI;AAAM,WAAO,EAAE,SAAS,MAAM,IAAI,KAAK;AAC3C,SAAO,EAAE,SAAS,MAAM,OAAG,uCAAY,qBAAqB;AAAA;AAAA,EAAQ,sBAAsB,KAAK;AACjG;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
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.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/testeable-utils/axe-core/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { toHaveNoViolations } from './toHaveNoViolations.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAmC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAmC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
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.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/testeable-utils/axe-core/reporter.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type { Result } from 'axe-core';\nimport { printReceived } from 'jest-matcher-utils';\n\nconst colorYellow = (arg?: string) => `\\x1b[93m ${arg || ''} \\x1b[0m`;\nconst colorGrey = (arg?: string) => `\\x1b[90m ${arg || ''} \\x1b[0m`;\nconst colorBlue = (arg?: string) => `\\x1b[34m ${arg || ''} \\x1b[0m`;\n\n// relevant code from https://github.com/nickcolley/jest-axe/blob/main/index.js\nexport const reporter = (violToFormat: Result[]) => {\n if (violToFormat.length === 0) return '';\n const lineBreak = '\\n\\n';\n const horizontalLine = '\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500';\n return violToFormat\n .map((violation) => {\n const errorBody = violation.nodes\n .map((node) => {\n const selector = node.target.join(', ');\n const expectedText = `Expected the HTML found at $('${selector}') to have no violations:${lineBreak}`;\n return `${expectedText + colorGrey(node.html) + lineBreak}Received:${lineBreak}${printReceived(\n `${violation.help} (${violation.id})`,\n )}${lineBreak}${colorYellow(node.failureSummary)}${lineBreak}${\n violation.helpUrl\n ? `You can find more information on this issue here: \\n${colorBlue(violation.helpUrl)}`\n : ''\n }`;\n })\n .join(lineBreak);\n\n return errorBody;\n })\n .join(lineBreak + horizontalLine + lineBreak);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,gCAA8B;AAE9B,MAAM,cAAc,CAAC,QAAiB,YAAY,OAAO;AACzD,MAAM,YAAY,CAAC,QAAiB,YAAY,OAAO;AACvD,MAAM,YAAY,CAAC,QAAiB,YAAY,OAAO;AAGhD,MAAM,WAAW,CAA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AAuD,UAAU,UAAU,OAAO,MAClF;AAAA,IAER,CAAC,EACA,KAAK,SAAS;AAEjB,WAAO;AAAA,EACT,CAAC,EACA,KAAK,YAAY,iBAAiB,SAAS;AAChD;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
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.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/testeable-utils/axe-core/shouldIgnoreNodeViolation.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type { NodeResult, Result } from 'axe-core';\nconst dataAttributeRegexp = /(data-[\\S]*)=[\"']([\\S]*)[\"']/gm;\n\nexport const shouldIgnoreNodeViolation = (node: NodeResult, violation: Result): boolean =>\n [...node.html.matchAll(dataAttributeRegexp)]\n .map(([fullMatch, dataKey, dataValue]) => ({\n fullMatch,\n dataKey,\n dataValue,\n }))\n .some(({ dataKey, dataValue }) => dataKey === `data-axe-ignore-${violation.id}` && dataValue === 'true');\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,MAAM,sBAAsB;AAErB,MAAM,4BAA4B,CAAC,MAAkB,cAC1D,CAAC,GAAG,KAAK,KAAK,SAAS,mBAAmB,CAAC,EACxC,IAAI,CAAC,CAAC,WAAW,SAAS,SAAS,OAAO;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AACF,EAAE,EACD,KAAK,CAAC,EAAE,SAAS,UAAU,MAAM,YAAY,mBAAmB,UAAU,QAAQ,cAAc,MAAM;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,MAAM,sBAAsB;AAErB,MAAM,4BAA4B,CAAC,MAAkB,cAC1D,CAAC,GAAG,KAAK,KAAK,SAAS,mBAAmB,CAAC,EACxC,IAAI,CAAC,CAAC,WAAW,SAAS,SAAS,OAAO;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AACF,EAAE,EACD,KAAK,CAAC,EAAE,SAAS,UAAU,MAAM,YAAY,mBAAmB,UAAU,QAAQ,cAAc,MAAM;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
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.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/testeable-utils/axe-core/toHaveNoViolations.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type { AxeResults, NodeResult, Result } from 'axe-core';\nimport { getMessageAndPass } from './getMessageAndPass.js';\nimport { shouldIgnoreNodeViolation } from './shouldIgnoreNodeViolation.js';\n\nexport const toHaveNoViolations = {\n toHaveNoViolations(results: AxeResults) {\n const { violations } = results;\n const finalViolations: Result[] = [];\n violations.forEach((violation) => {\n const { nodes } = violation;\n const newNodes: NodeResult[] = [];\n nodes.forEach((node) => {\n if (!shouldIgnoreNodeViolation(node, violation)) newNodes.push(node);\n });\n if (newNodes.length > 0) {\n finalViolations.push({ ...violation, nodes: newNodes });\n }\n });\n\n return { actual: violations, ...getMessageAndPass(finalViolations) };\n },\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,+BAAkC;AAClC,uCAA0C;AAEnC,MAAM,qBAAqB;AAAA,EAChC,mBAAmB,SAAqB;AACtC,UAAM,EAAE,WAAW,IAAI;AACvB,UAAM,kBAA4B,CAAC;AACnC,eAAW,QAAQ,CAAC,cAAc;AAChC,YAAM,EAAE,MAAM,IAAI;AAClB,YAAM,WAAyB,CAAC;AAChC,YAAM,QAAQ,CAAC,SAAS;AACtB,YAAI,KAAC,4DAA0B,MAAM,SAAS;AAAG,mBAAS,KAAK,IAAI;AAAA,MACrE,CAAC;AACD,UAAI,SAAS,SAAS,GAAG;AACvB,wBAAgB,KAAK,EAAE,GAAG,WAAW,OAAO,SAAS,CAAC;AAAA,MACxD;AAAA,IACF,CAAC;AAED,WAAO,EAAE,QAAQ,YAAY,OAAG,4CAAkB,eAAe,EAAE;AAAA,EACrE;AACF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,+BAAkC;AAClC,uCAA0C;AAEnC,MAAM,qBAAqB;AAAA,EAChC,mBAAmB,SAAqB;AACtC,UAAM,EAAE,WAAW,IAAI;AACvB,UAAM,kBAA4B,CAAC;AACnC,eAAW,QAAQ,CAAC,cAAc;AAChC,YAAM,EAAE,MAAM,IAAI;AAClB,YAAM,WAAyB,CAAC;AAChC,YAAM,QAAQ,CAAC,SAAS;AACtB,YAAI,KAAC,4DAA0B,MAAM,SAAS;AAAG,mBAAS,KAAK,IAAI;AAAA,MACrE,CAAC;AACD,UAAI,SAAS,SAAS,GAAG;AACvB,wBAAgB,KAAK,EAAE,GAAG,WAAW,OAAO,SAAS,CAAC;AAAA,MACxD;AAAA,IACF,CAAC;AAED,WAAO,EAAE,QAAQ,YAAY,OAAG,4CAAkB,eAAe,EAAE;AAAA,EACrE;AACF;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
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.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/testeable-utils/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { toHaveNoViolations } from './axe-core/index.js';\nexport { makeDSVirtualListTesteable, undoDSVirtualListTesteable } from './DSVirtualList.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAAmC;AACnC,2BAAuE;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAAmC;AACnC,2BAAuE;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/testeable-utils/DSVirtualList.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-var-requires */\n/* eslint-disable import/namespace */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\nimport * as virtualLib from '@tanstack/react-virtual';\n// this mutableScope thing may be over-kill\n// better safe than sorry?\nconst mutableScope = { original: virtualLib.useVirtualizer };\n\ntype MakeTesteableParams = {\n overscan: number;\n itemHeight: number;\n parentHeight: number;\n width?: number;\n};\n\nexport const makeDSVirtualListTesteable = async ({\n overscan,\n itemHeight,\n parentHeight,\n width = 400,\n}: MakeTesteableParams): void => {\n // await import is used to avoid \"read-only\" imports at global level\n // which would prevent run-time monekey-patching\n const lib = await import('@tanstack/react-virtual');\n lib.useVirtualizer = jest.fn((virtualOpts: Parameters<virtualLib.originalUseVirtualizer>) =>\n mutableScope.original({\n ...virtualOpts,\n overscan,\n initialRect: { height: parentHeight, width },\n observeElementRect: (_, cb) => {\n cb({ height: parentHeight, width });\n },\n measureElement: () => itemHeight,\n }),\n );\n};\n\nexport const undoDSVirtualListTesteable = async () => {\n // await import is used to avoid \"read-only\" imports at global level\n // which would prevent run-time monekey-patching\n const lib = await import('@tanstack/react-virtual');\n lib.useVirtualizer = mutableScope.original;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACMvB,YAAY,gBAAgB;AAG5B,MAAM,eAAe,EAAE,UAAU,WAAW,eAAe;AASpD,MAAM,6BAA6B,OAAO;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,MAAiC;AAG/B,QAAM,MAAM,MAAM,OAAO;AACzB,MAAI,iBAAiB,KAAK;AAAA,IAAG,CAAC,gBAC5B,aAAa,SAAS;AAAA,MACpB,GAAG;AAAA,MACH;AAAA,MACA,aAAa,EAAE,QAAQ,cAAc,MAAM;AAAA,MAC3C,oBAAoB,CAAC,GAAG,OAAO;AAC7B,WAAG,EAAE,QAAQ,cAAc,MAAM,CAAC;AAAA,MACpC;AAAA,MACA,gBAAgB,MAAM;AAAA,IACxB,CAAC;AAAA,EACH;AACF;AAEO,MAAM,6BAA6B,YAAY;AAGpD,QAAM,MAAM,MAAM,OAAO;AACzB,MAAI,iBAAiB,aAAa;AACpC;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACMvB,YAAY,gBAAgB;AAG5B,MAAM,eAAe,EAAE,UAAU,WAAW,eAAe;AASpD,MAAM,6BAA6B,OAAO;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AACV,MAAiC;AAG/B,QAAM,MAAM,MAAM,OAAO,yBAAyB;AAClD,MAAI,iBAAiB,KAAK;AAAA,IAAG,CAAC,gBAC5B,aAAa,SAAS;AAAA,MACpB,GAAG;AAAA,MACH;AAAA,MACA,aAAa,EAAE,QAAQ,cAAc,MAAM;AAAA,MAC3C,oBAAoB,CAAC,GAAG,OAAO;AAC7B,WAAG,EAAE,QAAQ,cAAc,MAAM,CAAC;AAAA,MACpC;AAAA,MACA,gBAAgB,MAAM;AAAA,IACxB,CAAC;AAAA,EACH;AACF;AAEO,MAAM,6BAA6B,YAAY;AAGpD,QAAM,MAAM,MAAM,OAAO,yBAAyB;AAClD,MAAI,iBAAiB,aAAa;AACpC;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-test-utils",
3
- "version": "3.16.0-next.11",
3
+ "version": "3.16.0-next.13",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Test utilities",
6
6
  "files": [
@@ -13,6 +13,10 @@
13
13
  ".": {
14
14
  "import": "./dist/esm/index.js",
15
15
  "require": "./dist/cjs/index.js"
16
+ },
17
+ "./a11y": {
18
+ "import": "./dist/esm/testeable-utils/axe-core/index.js",
19
+ "require": "./dist/cjs/testeable-utils/axe-core/index.js"
16
20
  }
17
21
  },
18
22
  "sideEffects": [
@@ -35,16 +39,17 @@
35
39
  "indent": 4
36
40
  },
37
41
  "dependencies": {
38
- "axe-core": "4.5.1",
39
- "jest-axe": "7.0.0",
40
- "jest-matcher-utils": "29.2.2",
41
- "@elliemae/ds-system": "3.16.0-next.11"
42
+ "@tanstack/react-virtual": "3.0.0-beta.54",
43
+ "axe-core": "4.6.3",
44
+ "jest-axe": "7.0.1",
45
+ "jest-matcher-utils": "29.5.0",
46
+ "@elliemae/ds-system": "3.16.0-next.13"
42
47
  },
43
48
  "devDependencies": {
44
49
  "@testing-library/dom": "~8.19.0",
45
50
  "@testing-library/jest-dom": "~5.16.5",
46
51
  "@testing-library/react": "~12.1.3",
47
- "styled-components": "~5.3.6"
52
+ "styled-components": "~5.3.9"
48
53
  },
49
54
  "peerDependencies": {
50
55
  "react": "^17.0.2",