diff --git a/.eslintignore b/.eslintignore index 450d07f..040cad5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ -**/*.js -**/*.d.ts +**/*.cjs +**/*.mjs +**/*.d.mts node_modules/** diff --git a/test/detectors/k8sdetector.test.mts b/test/detectors/k8sdetector.test.mts index 3ddddcd..19cb2bb 100644 --- a/test/detectors/k8sdetector.test.mts +++ b/test/detectors/k8sdetector.test.mts @@ -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', {});