Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
///
import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-preact-pure'
const adapter = new Adapter()
configure({ adapter })
*
* 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');
// 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);