{"version":3,"sources":["https://lively-kernel.org/lively4/lively4-active-expression-proxies/test/fileindex-test.js"],"names":["expect","FileIndex","Paths","describe","sut","it","normalizePath","to","equal"],"mappings":";;;;;;AACQA,Y,sBAAAA,M;;AAEDC,e;;AACAC,W;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGPC,eAAS,WAAT,EAAsB,MAAM;;AAE1B,YAAIC,MAAM,IAAIH,SAAJ,CAAc,gBAAd,CAAV;;AAEAE,iBAAS,eAAT,EAA0B,MAAM;AAC9BE,aAAG,wBAAH,EAA6B,kBAAiB;AAC5CL,mBAAOE,MAAMI,aAAN,CAAoB,UAApB,EAAgC,iBAAhC,CAAP,EAA2DC,EAA3D,CAA8DC,KAA9D,CAAoE,yBAApE;AACD,WAFD;AAGAH,aAAG,yBAAH,EAA8B,kBAAiB;AAC7CL,mBAAOE,MAAMI,aAAN,CAAoB,UAApB,EAAgC,wBAAhC,CAAP,EAAkEC,EAAlE,CAAqEC,KAArE,CAA2E,yBAA3E;AACD,WAFD;;AAIAH,aAAG,eAAH,EAAoB,kBAAiB;AACnCL,mBAAOE,MAAMI,aAAN,CAAoB,WAApB,EAAiC,4BAAjC,EAA+D,gBAA/D,CAAP,EAAyFC,EAAzF,CAA4FC,KAA5F,CAAkG,yBAAlG;AACD,WAFD;;AAIAH,aAAG,WAAH,EAAgB,kBAAiB;AAC/BL,mBAAOE,MAAMI,aAAN,CAAoB,yBAApB,EAA+C,4BAA/C,EAA6E,gBAA7E,CAAP,EAAuGC,EAAvG,CAA0GC,KAA1G,CAAgH,yBAAhH;AACD,WAFD;;AAIAH,aAAG,wBAAH,EAA6B,kBAAiB;AAC5CL,mBAAOE,MAAMI,aAAN,CAAoB,aAApB,EAAmC,wBAAnC,CAAP,EAAqEC,EAArE,CAAwEC,KAAxE,CAA8E,qBAA9E;AACD,WAFD;AAGD,SAnBD;AAoBD,OAxBD","file":"fileindex-test.js","sourcesContent":["\nimport {expect} from 'src/external/chai.js';\n\nimport FileIndex from \"src/client/fileindex.js\"\nimport Paths from \"src/client/paths.js\"\n\n\ndescribe('FileIndex', () => {\n  \n  var sut = new FileIndex(\"fileindex_test\")\n  \n  describe('normalizePath', () => {\n    it('relative path with dir', async function() {\n      expect(Paths.normalizePath(\"hello.md\", \"http://foo/bar/\")).to.equal(\"http://foo/bar/hello.md\")\n    });\n    it('relative path with file', async function() {\n      expect(Paths.normalizePath(\"hello.md\", \"http://foo/bar/blub.md\")).to.equal(\"http://foo/bar/hello.md\")\n    });\n    \n    it('absolute path', async function() {\n      expect(Paths.normalizePath(\"/hello.md\", \"http://foo/bar/huh/blub.md\", \"http://foo/bar\")).to.equal(\"http://foo/bar/hello.md\")\n    });\n    \n    it('keep URLs', async function() {\n      expect(Paths.normalizePath(\"http://foo/bar/hello.md\", \"http://foo/bar/huh/blub.md\", \"http://foo/bar\")).to.equal(\"http://foo/bar/hello.md\")\n    });\n    \n    it('resolve relative parts', async function() {\n      expect(Paths.normalizePath(\"../hello.md\", \"http://foo/bar/blub.md\")).to.equal(\"http://foo/hello.md\")\n    });\n  })\n});\n"]}