yili-dag.spec.ts 515 B

123456789101112131415161718192021
  1. import { expect, test } from '@jupyterlab/galata';
  2. /**
  3. * Don't load JupyterLab webpage before running the tests.
  4. * This is required to ensure we capture all log messages.
  5. */
  6. test.use({ autoGoto: false });
  7. test('should emit an activation console message', async ({ page }) => {
  8. const logs: string[] = [];
  9. page.on('console', message => {
  10. logs.push(message.text());
  11. });
  12. await page.goto();
  13. expect(
  14. logs.filter(s => s === 'JupyterLab extension yili-dag is activated!')
  15. ).toHaveLength(1);
  16. });