How to use enzyme-adapter-preact-pure - 3 common examples

To help you get started, we’ve selected a few enzyme-adapter-preact-pure examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github code-and-comment / code-and-comment / test / setup.js View on Github external
/// 

import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-preact-pure'


const adapter = new Adapter()
configure({ adapter })
github webcomponents / custom-elements-everywhere / libraries / preact / tests.webpack.js View on Github external
*
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Run basic and advanced tests through Karma
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-preact-pure';

// Configure Enzyme for the appropriate React adapter
Enzyme.configure({ adapter: new Adapter() });

require('./src/basic-tests.js');
require('./src/advanced-tests.js');
github hypothesis / lms / lms / static / scripts / bootstrap.js View on Github external
// Expose sinon assertions.
sinon.assert.expose(assert, { prefix: null });

// Configure Enzyme for UI tests.
require('preact/debug');
import { patchPropTypes } from './frontend_apps/utils/prop-types';
import propTypes from 'prop-types';
patchPropTypes(propTypes);

import { configure } from 'enzyme';
import { Adapter } from 'enzyme-adapter-preact-pure';
configure({ adapter: new Adapter() });

// Register the same set of icons that is available in the app.
import { registerIcons } from './frontend_apps/components/SvgIcon';
import iconSet from './frontend_apps/icons';
registerIcons(iconSet);

enzyme-adapter-preact-pure

Enzyme adapter for Preact

MIT
Latest version published 2 years ago

Package Health Score

63 / 100
Full package analysis

Popular enzyme-adapter-preact-pure functions

Similar packages