Last active
September 4, 2020 14:45
-
-
Save PCreations/82bb222fb1cc17c18370c97a7e6584dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("s3xmlUploader", () => { | |
it("can be nullable", async () => { | |
// arrange | |
const xmlUploader = createFakeS3xmlUploader({ bucketName: "test-bucket" }); | |
const xmlString = | |
'<?xml version="1.0" encoding="UTF-8"?><hello><to>Test</to></hello>'; | |
const domain = "www.my-website.co.uk"; | |
// act | |
await xmlUploader.upload({ domain, xmlString }); | |
// assert | |
expect(xmlUploader.getLastPutObject()).toEqual({ | |
Bucket: "test-bucket", | |
Key: "www.my-website.co.uk/sitemap.xml", | |
Body: xmlString, | |
ContentType: "application/xml", | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment