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

feat: automated testing #3490

Merged
merged 37 commits into from
Nov 10, 2023
Merged

feat: automated testing #3490

merged 37 commits into from
Nov 10, 2023

Conversation

Rathoz
Copy link
Collaborator

@Rathoz Rathoz commented Nov 7, 2023

Summary

Setup automated testing using the busted framework
image

@Rathoz Rathoz added the chore label Nov 7, 2023
spec/abbreviation_spec.lua Outdated Show resolved Hide resolved
@Rathoz
Copy link
Collaborator Author

Rathoz commented Nov 8, 2023

will all tests need to be adjusted like logic, array and abbr?

Yup

@Rathoz Rathoz requested a review from mbergen November 8, 2023 12:58
Copy link
Collaborator

@hjpalpha hjpalpha left a comment

Choose a reason for hiding this comment

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

okay so far, assume you want to convert all the test modules before final review

@Rathoz
Copy link
Collaborator Author

Rathoz commented Nov 8, 2023

okay so far, assume you want to convert all the test modules before final review

Will start with a subset, not all. Some are quite annoying as we don't have a MW environment running exactly, so need to fake or mock it

@iMarbot
Copy link
Collaborator

iMarbot commented Nov 8, 2023

Do we not care about VariablesLua.varexists( name ) and VariablesLua.var_final( name, default ) btw?

@Rathoz
Copy link
Collaborator Author

Rathoz commented Nov 8, 2023

Do we not care about VariablesLua.varexists( name ) and VariablesLua.var_final( name, default ) btw?

Added varexists. But not doing var_final. var_final is deprecated since MW 1.35, and basically never worked in lua

@Rathoz
Copy link
Collaborator Author

Rathoz commented Nov 8, 2023

Think I'm done with migrating tests for this PR, so feel free to review

@Rathoz Rathoz requested review from hjpalpha and mbergen November 8, 2023 17:41
@iMarbot
Copy link
Collaborator

iMarbot commented Nov 8, 2023

Why the need to implement mw.text.split() functionality but no others?

@Rathoz
Copy link
Collaborator Author

Rathoz commented Nov 9, 2023

Why the need to implement mw.text.split() functionality but no others?

Was used in a few tests indirectly, Date/Ext and Flags. It's not the complete MW implementation, but probably something good enough for now.

I was looking at bringing over Scribunto as a gitmodule (not lua file), but most of their implementations are dependent on PHP, with the only PHP free libraries being ustring and html, the rest have some dependency on PHP.

@Rathoz Rathoz merged commit a969054 into main Nov 10, 2023
4 checks passed
@Rathoz Rathoz deleted the ci-automated-tests branch November 10, 2023 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants