Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Should gts fix or gts check find unused variables? #73

Closed
nolanmar511 opened this issue Nov 1, 2017 · 1 comment
Closed

Should gts fix or gts check find unused variables? #73

nolanmar511 opened this issue Nov 1, 2017 · 1 comment

Comments

@nolanmar511
Copy link

I had the following test case where durationMillis is unused. If I run gts fix or gts check I don't get any output.
Should this problem be caught?

it('should throw error when disabled', async () => {
      const durationMillis = 10 * 1000;
      const intervalBytes = 1024 * 512;
      const stackDepth = 32;
      const profiler = new HeapProfiler(intervalBytes, stackDepth);
      profiler.disable();
      try {
        const profile = await profiler.profile();
        assert.fail('Expected error to be thrown.');
      } catch (err) {
        assert.equal(err.message, 'Heap profiler is not enabled.');
      }
    });
@ofrobots
Copy link
Contributor

ofrobots commented Nov 2, 2017

I believe this is already fixed by #62 and released as version 0.4.1. I think you need to pick up the latest version of gts which would be facilitated by googleapis/cloud-profiler-nodejs#26.

@ofrobots ofrobots closed this as completed Nov 2, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants