コード例 #1
0
 it('translates a reference to a path', () => {
   path = getPath('#/definitions/foo')
   expect(path).to.be.equal('definitions.foo')
 })
コード例 #2
0
 it('translates an array reference to a path', () => {
   path = getPath('#/definitions/foo/1/bar')
   expect(path).to.be.equal('definitions.foo.1.bar')
 })
コード例 #3
0
 expect(() => {
   getPath('definitions/foo')
 }).to.throw('Invalid reference "definitions/foo" must begin with "#/"')