Skip to content
This repository was archived by the owner on Dec 24, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions lib/base.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import BaseClass from './base';

describe('BaseClass', () => {
it('should be able to create BaseClass with options', () => {
const instance = new BaseClass({
baselineFolder: './subfolder//../baseline',
screenshotPath: './../my_folder//screenshots'
});
expect(instance.folders.actualFolder).toBe('../my_folder/screenshots/actual');
expect(instance.folders.baselineFolder).toBe('baseline');
expect(instance.folders.diffFolder).toBe('../my_folder/screenshots/diff');
});

it('should be able to create BaseClass with default options', () => {
const instance = new BaseClass({});
expect(instance.folders.actualFolder).toBe('.tmp/actual');
expect(instance.folders.baselineFolder).toBe('wic/baseline/');
expect(instance.folders.diffFolder).toBe('.tmp/diff');
});
});
6 changes: 3 additions & 3 deletions lib/clientSideScripts/scrollToPosition.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import scrollToPosition from './scrollToPosition';

xdescribe('scrollToPosition', () => {
describe('scrollToPosition', () => {
it('should check if the scrollTo function has been called', () => {
window.scrollTo = jest.fn();
scrollToPosition(150);
// I can't verify the call of the scrollToPosition with Jest, so there is no verification here, sorry :(
// If you know a way, please add it here ;-)
expect(window.scrollTo).toBeCalledWith(0, 150);
});
});