From 361168f55934dec002c0d91aceb2581a25690bc3 Mon Sep 17 00:00:00 2001 From: Akansha Arora <> Date: Wed, 25 Sep 2024 11:30:26 +0530 Subject: [PATCH] Clean up code by removing lint errors --- test/features/jarvis-chat/jarvis-chat.test.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/features/jarvis-chat/jarvis-chat.test.js b/test/features/jarvis-chat/jarvis-chat.test.js index a94ae533f0..ba3e260b2f 100644 --- a/test/features/jarvis-chat/jarvis-chat.test.js +++ b/test/features/jarvis-chat/jarvis-chat.test.js @@ -262,35 +262,29 @@ describe('Jarvis Chat', () => { params.callbacks.onReadyCallback(); expect(openMessagingWindowSpy.called).to.be.true; }); + it('should use stage asset URL in non-prod environment', async () => { setConfig(defaultConfig); const config = getConfig(); config.jarvis.onDemand = false; - const loadScriptSpy = sinon.spy(); const loadStyleSpy = sinon.spy(); - await initJarvisChat(config, loadScriptSpy, loadStyleSpy, sinon.stub()); - const expectedAsset = 'https://stage-client.messaging.adobe.com/latest/AdobeMessagingClient'; expect(loadScriptSpy.calledWithExactly(`${expectedAsset}.js`)).to.be.true; expect(loadStyleSpy.calledWithExactly(`${expectedAsset}.css`)).to.be.true; }); - + it('should use prod asset URL in prod environment', async () => { setConfig(defaultConfig); const config = getConfig(); config.jarvis.onDemand = false; config.env.name = 'prod'; - const loadScriptSpy = sinon.spy(); const loadStyleSpy = sinon.spy(); - await initJarvisChat(config, loadScriptSpy, loadStyleSpy, sinon.stub()); - const expectedAsset = 'https://client.messaging.adobe.com/latest/AdobeMessagingClient'; expect(loadScriptSpy.calledWithExactly(`${expectedAsset}.js`)).to.be.true; expect(loadStyleSpy.calledWithExactly(`${expectedAsset}.css`)).to.be.true; }); - });