Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Migrate tests to Node's built-in test runner #953

Merged
merged 24 commits into from
Oct 17, 2024
Merged

Migrate tests to Node's built-in test runner #953

merged 24 commits into from
Oct 17, 2024

Conversation

mhennoch
Copy link
Contributor

No description provided.

@mhennoch mhennoch requested review from a team as code owners September 16, 2024 11:54
@mhennoch mhennoch changed the base branch from main to v3 September 20, 2024 09:01
.eslintrc.js Outdated
@@ -1,6 +1,6 @@
module.exports = {
env: {
"mocha": true,
// "mocha": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the comment?

- name: Run tests
run: npm run test
# - name: Run tests
# run: npm run test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

- name: Run tests
run: npm run test
# - name: Run tests
# run: npm run test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

package.json Outdated
@@ -100,11 +97,10 @@
"dependencies": {
"@grpc/grpc-js": "^1.11.1",
"@grpc/proto-loader": "^0.7.13",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/api": "^1.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is api lowered to 1.3?


const error = new Error('test error');

Utils.onError(spanMock, error);

sinon.assert.calledOnce(recordExceptionStub);
sinon.assert.calledWith(recordExceptionStub, error);
assert(recordExceptionStub.mock.callCount() === 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert.equal to get better error logs

test/profiling/exporter.test.ts Outdated Show resolved Hide resolved
test/profiling/exporter.test.ts Outdated Show resolved Hide resolved
test/start.test.ts Outdated Show resolved Hide resolved
test/start.test.ts Show resolved Hide resolved
test/tracing/tracing.test.ts Outdated Show resolved Hide resolved
@seemk seemk changed the title New log runner Migrate tests to Node's built-in test runner Oct 17, 2024
@seemk seemk merged commit 5af79ea into v3 Oct 17, 2024
67 checks passed
@seemk seemk deleted the new-log-runner branch October 17, 2024 11:39
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants