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

test: Refactor test set up for readability #810

Merged

Conversation

rmi22186
Copy link
Member

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

tests-main.js, config.js, utils are all confusing names inside of a test folder. In order to make tests a bit more readable, these files have been reorganized and renamed.

Testing Plan

  • Was this tested locally? If not, explain why.

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@@ -10,7 +10,7 @@ const extensions = ['.js', '.ts'];

const builds = {
main: {
input: 'test/src/tests-main.js',
input: 'test/src/__test.index.ts',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the double underscore? It's not python, lol.

src/sdkRuntimeModels.ts Outdated Show resolved Hide resolved
@@ -8,7 +8,7 @@ import json from '@rollup/plugin-json';

export default [
{
input: 'test/src/tests-main.js',
input: 'test/src/_index.ts',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it single or double?

test/src/tests-batchUploader.ts Outdated Show resolved Hide resolved
test/src/tests-beaconUpload.ts Outdated Show resolved Hide resolved
test/src/tests-config-api-client.ts Outdated Show resolved Hide resolved
test/src/tests-consent.ts Outdated Show resolved Hide resolved
test/src/tests-kit-blocking.ts Outdated Show resolved Hide resolved
test/src/config/setup.ts Outdated Show resolved Hide resolved
@@ -8,7 +8,7 @@ import json from '@rollup/plugin-json';

export default [
{
input: 'test/src/tests-main.js',
input: 'test/src/_test.index.ts',
Copy link
Collaborator

Choose a reason for hiding this comment

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

As per our conversation this morning, I thought we were just going to call this index.ts?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I thought we were just removing the underscore. If the idea is to eventually rename things to module.spec.ts like you have for vault.spec.ts, then once we have things higher alphabetically, it's better to keep it the underscore to keep it at the top of the folder.

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 35 Code Smells

No Coverage information No Coverage information
2.1% 2.1% Duplication

@rmi22186 rmi22186 merged commit f842ef5 into ci/SQDSDKS-5780-cross-browser-testing Dec 1, 2023
25 of 28 checks passed
@rmi22186 rmi22186 deleted the ci/SQDSDKS-5960-refactor-tests branch January 4, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants