Skip to content

Commit

Permalink
ci/cd: revert premature test changes, fix text(), fix gitlab push
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Sep 22, 2024
1 parent 58dc00d commit c046506
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
chmod 600 ~/.ssh/id_rsa
echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
git remote add gitlab "[email protected]:sd/mwn.git"
git push gitlab master --force-with-lease
git push gitlab master --force
git push gitlab --tags
rm -rf ~/.ssh
env:
Expand Down
1 change: 0 additions & 1 deletion src/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ export default function (bot: Mwn): MwnPageStatic {
prop: 'wikitext',
})
.then((data) => {
this.data.text = data.parse.wikitext;
return data.parse.wikitext;
});
}
Expand Down
11 changes: 9 additions & 2 deletions tests/page.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,18 @@ describe('Page', async function () {
expect(talkpage.getSubjectPage()).to.be.instanceOf(bot.Page);
});

it('text', function () {
return page.text().then((text) => {
expect(text).to.be.a('string');
});
});

it('categories', function () {
return page.categories().then((cats) => {
expect(cats).to.be.instanceOf(Array);
expect(cats.length).to.be.gte(1); // check it on testwiki, could change
expect(cats[0]).to.be.a('string');
expect(cats[0].category).to.be.a('string');
expect(cats[0].sortkey).to.be.a('string');
});
});

Expand Down Expand Up @@ -90,7 +97,7 @@ describe('Page', async function () {
return page.links().then((links) => {
expect(links).to.be.instanceOf(Array);
expect(links.length).to.be.gte(1);
expect(links[0]).to.be.a('string');
expect(links[0].title).to.be.a('string');
});
});

Expand Down

0 comments on commit c046506

Please sign in to comment.