Skip to content

refactor: roundtrip test logic - #407#408

Merged
algomaster99 merged 3 commits intoalgoo-ooxmlfrom
k-kumar-01/i407/tests-refactor
Jun 14, 2021
Merged

refactor: roundtrip test logic - #407#408
algomaster99 merged 3 commits intoalgoo-ooxmlfrom
k-kumar-01/i407/tests-refactor

Conversation

@K-Kumar-01
Copy link
Copy Markdown
Collaborator

Signed-off-by: k-kumar-01 kushalkumargupta4@gmail.com

Closes #407

Refactors the test logic in CiceroMarkToOOXMLRoundTrip.test.js

Changes

  • Use a function to check for the equality of ciceroMark(s).
  • Replace the logic with the function.

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to master from fork:branchname

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
@K-Kumar-01 K-Kumar-01 requested a review from algomaster99 June 14, 2021 10:55
Copy link
Copy Markdown
Contributor

@algomaster99 algomaster99 left a comment

Choose a reason for hiding this comment

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

This is a good start. But I think it can be refactored further. For example, you're still hardcoding the filename of your test data. Maybe you can avoid that. What you can probably do is use fs module to iterate over the files in the directory and run your test function over them. Once you do this, you won't have to edit your test files a lot and you will be done just by adding a test case for each node you write the transformations.

Read files from directory
Run test for each read file

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
@K-Kumar-01 K-Kumar-01 requested a review from algomaster99 June 14, 2021 19:40
@K-Kumar-01
Copy link
Copy Markdown
Collaborator Author

@algomaster99
I have updated the PR. Let me know if there are any changes required.

Copy link
Copy Markdown
Contributor

@algomaster99 algomaster99 left a comment

Choose a reason for hiding this comment

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

Minor change. Then we are good to go.

@K-Kumar-01
Copy link
Copy Markdown
Collaborator Author

@algomaster99
I am unable to see the changes requested. Can you please mention them in a comment?

Copy link
Copy Markdown
Contributor

@algomaster99 algomaster99 left a comment

Choose a reason for hiding this comment

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

Here you go.

Comment thread packages/markdown-docx/test/CiceroMarkToOOXMLRoundTrip.test.js Outdated
Test inequality hardcore file name

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
@algomaster99 algomaster99 merged commit 0675af6 into algoo-ooxml Jun 14, 2021
@algomaster99 algomaster99 deleted the k-kumar-01/i407/tests-refactor branch June 14, 2021 20:33
algomaster99 pushed a commit that referenced this pull request Jun 17, 2021
* refactor: roundtrip test logic - #407

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>

* refactor: roundtrip test logic - #407

Read files from directory
Run test for each read file

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>

* refactor: roundtrip test logic - #407

Test inequality hardcore file name

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
algomaster99 pushed a commit that referenced this pull request Jun 17, 2021
* refactor: roundtrip test logic - #407

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>

* refactor: roundtrip test logic - #407

Read files from directory
Run test for each read file

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>

* refactor: roundtrip test logic - #407

Test inequality hardcore file name

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
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