Commit 3db85409 authored by Winnie Hellmann's avatar Winnie Hellmann

Add failing test for hasQuickActions

(cherry picked from commit 4ce36f34)
parent 7c9ad6d3
import { hasQuickActions } from '~/notes/stores/utils';
describe('hasQuickActions', () => {
it.each`
input | expected
${'some comment'} | ${false}
${'/quickaction'} | ${true}
${'some comment with\n/quickaction'} | ${true}
`('returns $expected for $input', ({ input, expected }) => {
expect(hasQuickActions(input)).toBe(expected);
});
it('is stateless', () => {
expect(hasQuickActions('some comment')).toBe(hasQuickActions('some comment'));
expect(hasQuickActions('/quickaction')).toBe(hasQuickActions('/quickaction'));
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment