Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
TsayAdobe committed Jan 2, 2025
1 parent 215fcef commit 93b85b6
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions test/scripts/utils.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { setLibs, getLibs } from '../../acrobat/scripts/utils';
import * as sinon from 'sinon';
/* eslint-disable compat/compat */
import { expect } from '@esm-bundle/chai';
import { setLibs } from '../../acrobat/scripts/utils.js';

describe('Test utils.js', async () => {
it('tests setLibs', async () => {
const libs = setLibs('/lib');
expect(libs).to.equal('https://main--milo--adobecom.hlx.live/libs');
describe('Test utils.js', () => {
it('tests setLibs with hlx domain', () => {
const libs = setLibs('/lib', new URL('https://stage--dc--adobecom.hlx.live?milolibs=test'));
expect(libs).to.equal('https://test--milo--adobecom.hlx.live/libs');
});

it('tests setLibs with aem domain', () => {
const libs = setLibs('/lib', new URL('https://stage--dc--adobecom.aem.live?milolibs=test'));
expect(libs).to.equal('https://test--milo--adobecom.aem.live/libs');
});
});

0 comments on commit 93b85b6

Please sign in to comment.