Example #1
0
    waitsForPromise(async () => {
      const subject = new Subject();
      spyOn(FileWatcherService, 'watchWithNode').andReturn(subject.publish());

      const serverArgs = findClangServerArgs();
      const server = new ClangServer(
        TEST_FILE,
        '',
        serverArgs,
        Promise.resolve({
          flags: [],
          usesDefaultFlags: false,
          flagsFile: '',
        }),
      );

      await server.waitForReady();
      subject.next(null);
      expect(server.getFlagsChanged()).toBe(true);
    });