Validating Core Module Exports Implementation in preactjs/preact
This test suite validates the core exports and build artifacts of the Preact library. It ensures that the main Preact module exposes all essential API functions and components required for the framework to function properly.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
preactjs/preact
test/node/index.test.js
import { expect } from 'chai';
import * as preact from '../../';
describe('build artifact', () => {
// #1075 Check that the build artifact has the correct exports
it('should have exported properties', () => {
expect(preact).to.be.an('object');
expect(preact).to.have.property('createElement');
expect(preact).to.have.property('h');
expect(preact).to.have.property('Component');
expect(preact).to.have.property('render');
expect(preact).to.have.property('hydrate');
// expect(preact).to.have.property('options');
});
});