Add failing test for hasQuickActions
This commit is contained in:
parent
bc75355986
commit
4ce36f3443
|
@ -0,0 +1,17 @@
|
|||
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'));
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue