debugger.spec.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { expect } from 'chai';
  2. import {
  3. CodeMirrorEditorFactory,
  4. CodeMirrorMimeTypeService
  5. } from '@jupyterlab/codemirror';
  6. import { CommandRegistry } from '@phosphor/commands';
  7. import { Debugger } from '../../lib/debugger';
  8. import { DebugService } from '../../lib/service';
  9. class TestPanel extends Debugger {}
  10. describe('Debugger', () => {
  11. const service = new DebugService();
  12. const registry = new CommandRegistry();
  13. const factoryService = new CodeMirrorEditorFactory();
  14. const mimeTypeService = new CodeMirrorMimeTypeService();
  15. let panel: TestPanel;
  16. beforeEach(() => {
  17. panel = new TestPanel({
  18. debugService: service,
  19. callstackCommands: {
  20. registry,
  21. continue: '',
  22. terminate: '',
  23. next: '',
  24. stepIn: '',
  25. stepOut: ''
  26. },
  27. editorServices: {
  28. factoryService,
  29. mimeTypeService
  30. }
  31. });
  32. });
  33. afterEach(() => {
  34. panel.dispose();
  35. });
  36. describe('#constructor()', () => {
  37. it('should create a new debugger panel', () => {
  38. expect(panel).to.be.an.instanceOf(Debugger);
  39. });
  40. });
  41. });