|
7 | 7 | import { expect } from 'chai'; |
8 | 8 | import { Connection, Org } from '@salesforce/core'; |
9 | 9 | import sinon from 'sinon'; |
10 | | -import { |
11 | | - replaceSpacesAndSpecialChars, |
12 | | - hasSpacesOrSpecialChars, |
13 | | - ExperienceSite, |
14 | | -} from '../../src/shared/experience/expSite.js'; |
15 | | - |
16 | | -describe('replaceSpacesAndSpecialChars', () => { |
17 | | - it('should replace spaces and special characters with underscores', () => { |
18 | | - const input = 'site#name@with-special%chars with spaces'; |
19 | | - const expectedOutput = 'site_name_with_special_chars_with_spaces'; |
20 | | - const output = replaceSpacesAndSpecialChars(input); |
21 | | - expect(output).to.equal(expectedOutput); |
22 | | - }); |
23 | | -}); |
24 | | - |
25 | | -describe('hasSpacesOrSpecialChars', () => { |
26 | | - it('should return true if the input string has spaces', () => { |
27 | | - const input = 'Hello World'; |
28 | | - const output = hasSpacesOrSpecialChars(input); |
29 | | - expect(output).to.be.true; |
30 | | - }); |
31 | | - |
32 | | - it('should return true if the input string has special characters', () => { |
33 | | - const input = 'Hello, @#'; |
34 | | - const output = hasSpacesOrSpecialChars(input); |
35 | | - expect(output).to.be.true; |
36 | | - }); |
37 | | - |
38 | | - it('should return false if the input string has neither spaces nor special characters', () => { |
39 | | - const input = 'HelloWorld'; |
40 | | - const output = hasSpacesOrSpecialChars(input); |
41 | | - expect(output).to.be.false; |
42 | | - }); |
43 | | -}); |
| 10 | +import { ExperienceSite } from '../../src/shared/experience/expSite.js'; |
44 | 11 |
|
45 | 12 | describe('getRemoteMetadata', () => { |
46 | 13 | it('should return remote metadata when it exists', async () => { |
|
0 commit comments