is-top-page.spec.ts 335 B

123456789101112
  1. import { isTopPage } from './is-top-page';
  2. describe('TopPage Path test', () => {
  3. test.concurrent('Path is only "/"', () => {
  4. const result = isTopPage('/');
  5. expect(result).toBe(true);
  6. });
  7. test.concurrent('Path is not match string', () => {
  8. const result = isTopPage('/test');
  9. expect(result).toBe(false);
  10. });
  11. });