|
1 | 1 | import outdent from 'outdent'; |
2 | 2 | import { parseYamlToDocument } from '../../__tests__/utils.js'; |
3 | | -import { escapePointer, parseRef, refBaseName, unescapePointerFromURI } from '../ref-utils.js'; |
| 3 | +import { escapePointer, unescapePointer, parseRef, refBaseName } from '../ref-utils.js'; |
4 | 4 | import { lintDocument } from '../lint.js'; |
5 | 5 | import { createConfig } from '../config/index.js'; |
6 | 6 | import { BaseResolver } from '../resolve.js'; |
@@ -159,17 +159,17 @@ describe('ref-utils', () => { |
159 | 159 | }); |
160 | 160 | }); |
161 | 161 |
|
162 | | - describe('unescapePointerFromURI', () => { |
| 162 | + describe('unescapePointer', () => { |
163 | 163 | it('should unescape a pointer with a percent sign correctly', () => { |
164 | | - expect(unescapePointerFromURI('activity_level_%25')).toStrictEqual('activity_level_%'); |
| 164 | + expect(unescapePointer('activity_level_%25')).toStrictEqual('activity_level_%'); |
165 | 165 | }); |
166 | 166 |
|
167 | 167 | it('should unescape a pointer with a number correctly', () => { |
168 | | - expect(unescapePointerFromURI('123')).toStrictEqual('123'); |
| 168 | + expect(unescapePointer('123')).toStrictEqual('123'); |
169 | 169 | }); |
170 | 170 |
|
171 | 171 | it('should unescape a pointer correctly', () => { |
172 | | - expect(unescapePointerFromURI('scope~1complex~0name')).toStrictEqual('scope/complex~name'); |
| 172 | + expect(unescapePointer('scope~1complex~0name')).toStrictEqual('scope/complex~name'); |
173 | 173 | }); |
174 | 174 | }); |
175 | 175 | }); |
0 commit comments