Skip to content

Instantly share code, notes, and snippets.

import { mount } from 'enzyme';
it('should render the button correctly', () => {
const wrapper = mount(<App />);
const buttonText = 'Press';
expect(wrapper.contains(buttonText)).toEqual(true);
});
import Button from './components/Button';
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
</header>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</p>
<div>
trigger:
- master
pool:
name: Hosted Ubuntu 1604
steps:
- bash: npm install
displayName: NPM Install Dependencies
- bash: npm run build
displayName: Build Angular application
trigger:
- master
pool:
name: Hosted Ubuntu 1604
steps:
- task: RestoreAndSaveCache@1
inputs:
keyfile: '**/package-lock.json, !**/node_modules/**/package-lock.json, !**/.*/**/package-lock.json'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
condition: ne(variables['CacheRestored'], 'true')
trigger:
- master
pool:
name: Hosted Ubuntu 1604
steps:
- bash: npm install
displayName: NPM Install Dependencies
- bash: npm run lint
displayName: Run Angular linting
trigger:
- master
jobs:
- job: Linting
pool:
name: Hosted Ubuntu 1604
steps:
- bash: npm install
displayName: NPM Install Dependencies
trigger:
- master
jobs:
- job: Linting
pool:
name: Hosted Ubuntu 1604
steps:
- bash: npm install
displayName: NPM Install Dependencies