Skip to content

Commit

Permalink
updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jshemas committed Jan 23, 2024
1 parent 98407ff commit faa9836
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/integration/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ describe('basic', function () {
// this is fail in the github CI since these tests can run any where
// expect(result.ogLocale).to.be.eql('en_US');
expect(result.ogImage).to.be.eql([{
url: 'https://www.facebook.com/images/fb_logo/app-facebook-circle-bp.png',
url: 'https://www.facebook.com/images/fb_icon_325x325.png',
type: 'png',
}]);
expect(result.ogTitle).to.be.eql('Facebook - log in or sign up');
Expand Down
8 changes: 6 additions & 2 deletions tests/integration/blacklist.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('blacklist', function () {
console.log('error:', error);
console.log('result:', result);
expect(error).to.be.eql(false);
expect(result.ogTitle).to.be.eql('Wikipedia');
expect(result.ogTitle).to.be.eql('Wikipedia, the free encyclopedia');
expect(result.ogDescription).to.be.eql('Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.');
expect(result.favicon).to.be.eql('/static/favicon/wikipedia.ico');
expect(result.ogLocale).to.be.eql('en');
Expand All @@ -47,8 +47,10 @@ describe('blacklist', function () {
'charset',
'favicon',
'ogDescription',
'ogImage',
'ogLocale',
'ogTitle',
'ogType',
'requestUrl',
'success',
);
Expand All @@ -63,7 +65,7 @@ describe('blacklist', function () {
console.log('error:', error);
console.log('result:', result);
expect(error).to.be.eql(false);
expect(result.ogTitle).to.be.eql('Wikipedia');
expect(result.ogTitle).to.be.eql('Wikipedia, the free encyclopedia');
expect(result.ogDescription).to.be.eql('Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.');
expect(result.ogLocale).to.be.eql('en');
expect(result.requestUrl).to.be.eql('https://www.wikipedia.org/');
Expand All @@ -74,8 +76,10 @@ describe('blacklist', function () {
'charset',
'favicon',
'ogDescription',
'ogImage',
'ogLocale',
'ogTitle',
'ogType',
'requestUrl',
'success',
);
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/onlyGetOpenGraphInfo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('onlyGetOpenGraphInfo', function () {
console.log('error:', error);
console.log('result:', result);
expect(error).to.be.eql(false);
expect(result.ogTitle).to.be.eql('Wikipedia');
expect(result.ogTitle).to.be.eql('Wikipedia, the free encyclopedia');
expect(result.ogDescription).to.be.eql('Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.');
expect(result.ogLocale).to.be.eql('en');
expect(result.requestUrl).to.be.eql('http://www.wikipedia.org/');
Expand All @@ -43,8 +43,10 @@ describe('onlyGetOpenGraphInfo', function () {
'charset',
'favicon',
'ogDescription',
'ogImage',
'ogLocale',
'ogTitle',
'ogType',
'requestUrl',
'success',
);
Expand Down
20 changes: 15 additions & 5 deletions tests/integration/url.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('url', function () {
console.log('error:', error);
console.log('result:', result);
expect(error).to.be.eql(false);
expect(result.ogTitle).to.be.eql('Wikipedia');
expect(result.ogTitle).to.be.eql('Wikipedia, the free encyclopedia');
expect(result.ogDescription).to.be.eql('Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.');
expect(result.ogLocale).to.be.eql('en');
expect(result.requestUrl).to.be.eql('http://www.wikipedia.org/');
Expand All @@ -19,8 +19,10 @@ describe('url', function () {
'charset',
'favicon',
'ogDescription',
'ogImage',
'ogLocale',
'ogTitle',
'ogType',
'requestUrl',
'success',
);
Expand All @@ -32,7 +34,7 @@ describe('url', function () {
console.log('error:', error);
console.log('result:', result);
expect(error).to.be.eql(false);
expect(result.ogTitle).to.be.eql('Wikipedia');
expect(result.ogTitle).to.be.eql('Wikipedia, the free encyclopedia');
expect(result.ogDescription).to.be.eql('Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.');
expect(result.ogLocale).to.be.eql('en');
expect(result.requestUrl).to.be.eql('https://www.wikipedia.org/');
Expand All @@ -43,8 +45,10 @@ describe('url', function () {
'charset',
'favicon',
'ogDescription',
'ogImage',
'ogLocale',
'ogTitle',
'ogType',
'requestUrl',
'success',
);
Expand All @@ -56,7 +60,7 @@ describe('url', function () {
console.log('error:', error);
console.log('result:', result);
expect(error).to.be.eql(false);
expect(result.ogTitle).to.be.eql('Wikipedia');
expect(result.ogTitle).to.be.eql('Wikipedia, the free encyclopedia');
expect(result.ogDescription).to.be.eql('Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.');
expect(result.ogLocale).to.be.eql('en');
expect(result.requestUrl).to.be.eql('http://www.wikipedia.org/');
Expand All @@ -67,8 +71,10 @@ describe('url', function () {
'charset',
'favicon',
'ogDescription',
'ogImage',
'ogLocale',
'ogTitle',
'ogType',
'requestUrl',
'success',
);
Expand All @@ -80,7 +86,7 @@ describe('url', function () {
console.log('error:', error);
console.log('result:', result);
expect(error).to.be.eql(false);
expect(result.ogTitle).to.be.eql('Wikipedia');
expect(result.ogTitle).to.be.eql('Wikipedia, the free encyclopedia');
expect(result.ogDescription).to.be.eql('Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.');
expect(result.ogLocale).to.be.eql('en');
expect(result.requestUrl).to.be.eql('http://wikipedia.org/');
Expand All @@ -91,8 +97,10 @@ describe('url', function () {
'charset',
'favicon',
'ogDescription',
'ogImage',
'ogLocale',
'ogTitle',
'ogType',
'requestUrl',
'success',
);
Expand All @@ -104,7 +112,7 @@ describe('url', function () {
console.log('error:', error);
console.log('result:', result);
expect(error).to.be.eql(false);
expect(result.ogTitle).to.be.eql('Wikipedia');
expect(result.ogTitle).to.be.eql('Wikipedia, the free encyclopedia');
expect(result.ogLocale).to.be.eql('en');
expect(result.ogDescription).to.be.eql('Wikipedia is a free online encyclopedia, created and edited by volunteers around the world and hosted by the Wikimedia Foundation.');
expect(result.requestUrl).to.be.eql('http://wikipedia.org/');
Expand All @@ -115,8 +123,10 @@ describe('url', function () {
'charset',
'favicon',
'ogDescription',
'ogImage',
'ogLocale',
'ogTitle',
'ogType',
'requestUrl',
'success',
);
Expand Down

0 comments on commit faa9836

Please sign in to comment.