Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Sep 26, 2023
1 parent ca9f7ec commit 586b875
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/*.js
**/*.d.ts
**/*.cjs
**/*.mjs
**/*.d.mts
node_modules/**
9 changes: 8 additions & 1 deletion test/detectors/k8sdetector.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ describe('K8sDetector', function () {
});

it('should return an empty resource if this is not a K8S', function () {
process.env.HOSTNAME = '';
process.env.HOSTNAME = 'test';
return expect(runDetector(k8sDetector, config))
.to.eventually.be.an('object')
.and.have.deep.property('attributes', {});
});

it('should return an empty resource if this is not a K8S (no hostname)', function () {
delete process.env.HOSTNAME;
return expect(runDetector(k8sDetector, config))
.to.eventually.be.an('object')
.and.have.deep.property('attributes', {});
Expand Down

0 comments on commit 586b875

Please sign in to comment.