-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
Description
As title, test failed with AVA but passed with mocha.
Test Source
import test from 'ava';
import React from 'react';
import { shallow } from 'enzyme';
import Button from './Button';
import styles from './Button.css';
test('has hashed .btn className', t => {
const element = shallow(<Button>Submit</Button>);
const button = element.find('button');
t.is(button.prop('className'), styles.btn);
})
Error Message & Stack Trace
✖ has hashed .btn className
t.is(button.prop('className'), styles.btn)
| |
"Button__btn___3T3BQ" "Button__btn___2ZBj1"
Config
{
"ava": {
"files": [
"src/Button.ava.spec.js"
],
"source": [
"src/Button.js"
],
"concurrency": 5,
"failFast": true,
"tap": false,
"verbose": true,
"require": [
"babel-register"
],
"babel": "inherit"
}
}
Command-Line Arguments
NODE_ENV=test CONFIG=$(pwd)/webpack.config.test.js BABEL_DISABLE_CACHE=1 ava
Relevant Links
Environment
Node.js v6.2.0
darwin 15.2.0
ava 0.16.0
npm 3.8.9
tw0517tw and kpman