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

Fix issues with getArticleInfo #332

Merged
merged 1 commit into from
May 5, 2022
Merged

Conversation

andrewnicols
Copy link
Contributor

Several issues meant this just did not work at all:

  • titles was not instantiated
  • options.intestactions is assumed to exist
  • the page revisions were returned, instead of the full dataset.

Several issues meant this just did not work at all:

- titles was not instantiated
- options.intestactions is assumed to exist
- the page revisions were returned, instead of the full dataset.
Comment on lines +88 to +102
'getArticleInfo()': {
topic: function () {
client.getArticleInfo( ARTICLE, this.callback );
},
'valid content is passed to callback': function ( e, res ) {
assert.isArray( res );
assert.isTrue( res.length === 1 );

const data = res[ 0 ];
assert.isNumber( data.pageid );
assert.isString( data.title );
assert.isArray( data.protection );
assert.isTrue( data.title.includes( 'Albert Einstein' ) );
}
},
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for adding a test case!

@macbre macbre merged commit 72a9b9d into macbre:devel May 5, 2022
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