@awsui/test-utils-core
Advanced tools
Comparing version 1.0.59 to 1.0.60
@@ -0,3 +1,5 @@ | ||
import { act as reactDomAct } from 'react-dom/test-utils'; | ||
import { IElementWrapper } from './interfaces'; | ||
import { KeyCode } from './utils'; | ||
export declare const act: typeof reactDomAct; | ||
declare global { | ||
@@ -4,0 +6,0 @@ interface KeyboardEventInit { |
@@ -52,3 +52,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createWrapper = exports.ComponentWrapper = exports.ElementWrapper = exports.AbstractWrapper = exports.usesDom = void 0; | ||
exports.createWrapper = exports.ComponentWrapper = exports.ElementWrapper = exports.AbstractWrapper = exports.usesDom = exports.act = void 0; | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
@@ -60,3 +60,3 @@ // SPDX-License-Identifier: Apache-2.0 | ||
var utils_1 = require("./utils"); | ||
var act = ('act' in React ? React.act : test_utils_1.act); | ||
exports.act = ('act' in React ? React.act : test_utils_1.act); | ||
// Used as decorator to mark dom-only methods in test-utils | ||
@@ -98,3 +98,3 @@ // eslint-disable-next-line @typescript-eslint/no-empty-function | ||
var _this = this; | ||
act(function () { | ||
(0, exports.act)(function () { | ||
_this.element.dispatchEvent(event); | ||
@@ -106,3 +106,3 @@ }); | ||
var element_1 = this.element; | ||
act(function () { | ||
(0, exports.act)(function () { | ||
element_1.focus(); | ||
@@ -118,3 +118,3 @@ }); | ||
var element_2 = this.element; | ||
act(function () { | ||
(0, exports.act)(function () { | ||
element_2.blur(); | ||
@@ -121,0 +121,0 @@ }); |
{ | ||
"commit": "d112823d249752c3eb72b33bc7a5f35fa34ea206" | ||
"commit": "7c63f3960b9da45401c23d3c9f2eea1df200691f" | ||
} |
{ | ||
"version": "1.0.59", | ||
"version": "1.0.60", | ||
"name": "@awsui/test-utils-core", | ||
@@ -4,0 +4,0 @@ "files": [ |
49868
497