Skip to content

Instantly share code, notes, and snippets.

@eyaleizenberg
Last active June 12, 2019 06:55
Show Gist options
  • Save eyaleizenberg/b1ea6e27a2a6c5fde19eeb9f8d717792 to your computer and use it in GitHub Desktop.
Save eyaleizenberg/b1ea6e27a2a6c5fde19eeb9f8d717792 to your computer and use it in GitHub Desktop.
import { HelloPersonDriver } from './hello-person.driver';
describe('Hello Person', () => {
let driver: HelloPersonDriver;
beforeEach(() => {
driver = new HelloPersonDriver();
});
test('should render the name from the prop', () => {
driver.given.name('Jenia').when.rendered();
expect(driver.get.renderedName()).toBe('Jenia');
});
test('should fetch data with Eyal as the variable', () => {
driver.given.name('Eyal').when.rendered();
expect(driver.get.reportUserLogin()).toHaveBeenCalledWith('Eyal');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment