Skip to content

Commit

Permalink
fix(core): ✏️ fix typos in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfoucrier committed Jul 30, 2023
1 parent 61ac826 commit a748356
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/core/__tests__/modules/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ it('gets action, request, status and target', () => {
expect(cache.getTarget(key)).toBe(target);
});

it('update ', () => {
it('update', () => {
cache.update(key, { action: 'click' });

expect(cache.getAction(key)).toBe('click');
});

it('deletes ', () => {
it('deletes', () => {
cache.delete(key);

expect(cache.has(key)).toBeFalsy();
});

it('checks url ', () => {
it('checks url', () => {
cache.checkHref = jest.fn();
cache.has(key);

expect(cache.checkHref).toHaveBeenCalled();
});

it('uses cacheIgnore ', () => {
it('uses cacheIgnore', () => {
cache.checkHref = jest.fn().mockImplementation(() => true);
const res = cache.has(key);

Expand Down
4 changes: 2 additions & 2 deletions packages/core/__tests__/modules/ignore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ it('ignores all', () => {
expect(ignore.checkHref(url)).toBeTruthy();
});

it('ignores URL ', () => {
it('ignores URL', () => {
ignore = new Ignore('/');

expect(ignore.checkHref(url)).toBeTruthy();
expect(ignore.checkHref(url2)).toBeFalsy();
});

it('ignores URLs ', () => {
it('ignores URLs', () => {
ignore = new Ignore(['/', '/:segment/foo.html']);

expect(ignore.checkHref(url)).toBeTruthy();
Expand Down
2 changes: 1 addition & 1 deletion packages/core/__tests__/modules/prevent/prevent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Prevent } from '../../../src/modules/Prevent';

const prevent = new Prevent(false);

it('adds test ', () => {
it('adds test', () => {
const name = 'fake';
const check = () => true;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/__tests__/utils/history.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ afterEach(() => {
history.clear();
});

it('has no history ', () => {
it('has no history', () => {
expect(history.current).toBeUndefined();
});

Expand Down
2 changes: 1 addition & 1 deletion packages/css/__tests__/css.prefix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ it('prefixes with transition name', async () => {
expect(css.prefix).toBe(name);
});

it('prefixes with default ', async () => {
it('prefixes with default', async () => {
await barba.hooks.do('before', data, unnamed);
expect(css.prefix).toBe('barba');
css.prefix = null;
Expand Down

0 comments on commit a748356

Please sign in to comment.