update 5 files
This commit is contained in:
@@ -36,7 +36,7 @@ describe("📦 Amazon Book Search (Turkish) Integration Test", () => {
|
||||
.catch(done);
|
||||
});
|
||||
|
||||
it('Checks if the book thumb image is not empty 🌄', function (done) {
|
||||
it("Checks if the book thumb image is not empty 🌄", function (done) {
|
||||
this.timeout(timeoutDuration);
|
||||
bookSearch
|
||||
.getBookDetails(isbn)
|
||||
@@ -84,7 +84,7 @@ describe("📦 Amazon Book Search (Turkish) Integration Test", () => {
|
||||
.catch(done);
|
||||
});
|
||||
|
||||
it('Is the Gemini API test working for the book description 🤖', function (done) {
|
||||
it("Is the Gemini API test working for the book description 🤖", function (done) {
|
||||
this.timeout(timeoutDuration);
|
||||
bookSearch
|
||||
.getBookDetails(isbn, geminiApiKey)
|
||||
@@ -101,7 +101,11 @@ describe("📦 Amazon Book Search (English) Integration Test", () => {
|
||||
let bookSearch;
|
||||
const isbn = "0593724283";
|
||||
const timeoutDuration = 30000;
|
||||
const geminiApiKey = "AIzaSyAY15XJcK1VIxzMRe48dyDEeNPqeqhQt2I";
|
||||
|
||||
before(function (done) {
|
||||
this.timeout(timeoutDuration + 25000);
|
||||
setTimeout(done, 25000);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
bookSearch = new AmazonBookSearch("en");
|
||||
@@ -125,13 +129,15 @@ describe("📦 Amazon Book Search (English) Integration Test", () => {
|
||||
.getBookDetails(isbn)
|
||||
.then((bookDetails) => {
|
||||
expect(bookDetails).to.have.property("title");
|
||||
expect(bookDetails.title).to.equal("The Desert Spear: Book Two of The Demon Cycle");
|
||||
expect(bookDetails.title).to.equal(
|
||||
"The Desert Spear: Book Two of The Demon Cycle"
|
||||
);
|
||||
done();
|
||||
})
|
||||
.catch(done);
|
||||
});
|
||||
|
||||
it('Checks if the book thumb image is not empty 🌄', function (done) {
|
||||
it("Checks if the book thumb image is not empty 🌄", function (done) {
|
||||
this.timeout(timeoutDuration);
|
||||
bookSearch
|
||||
.getBookDetails(isbn)
|
||||
@@ -178,17 +184,4 @@ describe("📦 Amazon Book Search (English) Integration Test", () => {
|
||||
})
|
||||
.catch(done);
|
||||
});
|
||||
|
||||
it('Is the Gemini API test working for the book description 🤖', function (done) {
|
||||
this.timeout(timeoutDuration);
|
||||
bookSearch
|
||||
.getBookDetails(isbn, geminiApiKey)
|
||||
.then((bookDetails) => {
|
||||
expect(bookDetails).to.have.property("description");
|
||||
expect(bookDetails.description).to.be.a("string");
|
||||
done();
|
||||
})
|
||||
.catch(done);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user