fix(seed): Replaced 'include' with 'match' and RegExp for the (#16700)

Closes #16698
This commit is contained in:
Samuel Coe
2018-02-14 05:24:25 -06:00
committed by Stuart Taylor
parent 731efaaaae
commit 5668502720

View File

@ -714,7 +714,7 @@
} }
}, },
"tests": [ "tests": [
"getUserInput => assert(getUserInput('index').replace(/ /g, '').includes('classMyComponentextendsReact.Component{'), 'message: There should be a React component called <code>MyComponent</code>.');", "getUserInput => assert(getUserInput('index').replace(/\\s/g, '').includes('classMyComponentextendsReact.Component{'), 'message: There should be a React component called <code>MyComponent</code>.');",
"assert((function() { const mockedComponent = Enzyme.mount(React.createElement(MyComponent)); return mockedComponent.find('h1').text() === 'My First React Component!'; })(), 'message: <code>MyComponent</code> should contain an <code>h1</code> tag with text <code>My First React Component!</code> Case and punctuation matter.');", "assert((function() { const mockedComponent = Enzyme.mount(React.createElement(MyComponent)); return mockedComponent.find('h1').text() === 'My First React Component!'; })(), 'message: <code>MyComponent</code> should contain an <code>h1</code> tag with text <code>My First React Component!</code> Case and punctuation matter.');",
"assert(document.getElementById('challenge-node').childNodes.length === 1, 'message: <code>MyComponent</code> should render to the DOM.');" "assert(document.getElementById('challenge-node').childNodes.length === 1, 'message: <code>MyComponent</code> should render to the DOM.');"
], ],