{"size": 19969, "ext": "js", "max_stars_repo_path": "src/utils/Integration/Demo/EncodeDecodeDemo.test.js", "max_stars_repo_name": "kareldh/geo-data-integration", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/utils/Integration/Demo/EncodeDecodeDemo.test.js", "max_issues_repo_name": "kareldh/geo-data-integration", "max_issues_repo_issues_event_min_datetime": "2020-07-21T12:42:04.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T05:14:13.000Z", "max_forks_repo_path": "src/utils/Integration/Demo/EncodeDecodeDemo.test.js", "max_forks_repo_name": "kareldh/geo-data-integration", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 38.108778626, "max_line_length": 108, "alphanum_fraction": 0.5311733186}
/**
 * @jest-environment node
 */

import {
    decoderProperties, decoderPropertiesAlwaysProj,
    osmToOsm, osmToOsmNoEncoding, osmToRoutableTiles, osmToRoutableTilesNoEnc, osmToWegenregister,
    osmToWegenregisterNoEnc,
    routableTilesToRoutableTiles,
    routableTilesToRoutableTiles4MeterOffsetsDiff,
    routableTilesToRoutableTilesNoEncoding, routableTilesToWegenregister, routableTilesToWegenregisterNoEnc,
    wegenregisterToWegenregister, wegenregisterToWegenregisterNoEncoding,
    wegenregisterToWegenregisterNoEncodingNoShortLines,
    wegenregisterToWegenregisterNoShortLines
} from "./EncodeDecodeDemoTestFunctions.test";
import {internalPrecisionEnum} from "../OpenLR/map/Enum";
import {configProperties} from "../OpenLR/coder/CoderSettings";

describe.skip("tests using configProperties in centimeter",()=>{

    describe("tests different databases osm to reg",()=>{
        test('demo osm to wegenregister no proj',(done)=>{
            expect.hasAssertions();
            osmToWegenregister(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo osm to wegenregister always proj',(done)=>{
            expect.hasAssertions();
            osmToWegenregister(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo osm to wegenregister no enc no proj',(done)=>{
            expect.hasAssertions();
            osmToWegenregisterNoEnc(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo osm to wegenregister no enc always proj',(done)=>{
            expect.hasAssertions();
            osmToWegenregisterNoEnc(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
    });

    describe("tests different databases osm to rt",()=>{
        test('demo osm to RoutableTiles no proj',(done)=>{
            expect.hasAssertions();
            osmToRoutableTiles(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo osm to RoutableTiles always proj',(done)=>{
            expect.hasAssertions();
            osmToRoutableTiles(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo osm to RoutableTiles no enc no proj',(done)=>{
            expect.hasAssertions();
            osmToRoutableTilesNoEnc(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo osm to RoutableTiles no enc always proj',(done)=>{
            expect.hasAssertions();
            osmToRoutableTilesNoEnc(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
    });

    describe("tests different databases rt to reg",()=>{
        test('demo RoutableTiles to wegenregister no proj',(done)=>{
            expect.hasAssertions();
            routableTilesToWegenregister(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo RoutableTiles to wegenregister always proj',(done)=>{
            expect.hasAssertions();
            routableTilesToWegenregister(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo RoutableTiles to wegenregister no enc no proj',(done)=>{
            expect.hasAssertions();
            routableTilesToWegenregisterNoEnc(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
        test('demo RoutableTiles to wegenregister no enc always proj',(done)=>{
            expect.hasAssertions();
            routableTilesToWegenregisterNoEnc(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },160000);
    });

    describe("tests same database OSM",()=>{
        test('demo osm to osm',(done)=>{
            expect.hasAssertions();
            osmToOsm(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to osm no proj',(done)=>{
            expect.hasAssertions();
            osmToOsm(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to osm no encoding',(done)=>{
            expect.hasAssertions();
            osmToOsmNoEncoding(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to osm no encoding no proj',(done)=>{
            expect.hasAssertions();
            osmToOsmNoEncoding(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests same database Routable Tiles",()=>{
        test('demo RoutableTiles to RoutableTiles',(done)=>{
            expect.hasAssertions();
            routableTilesToRoutableTiles(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to RoutableTiles no proj',(done)=>{
            expect.hasAssertions();
            routableTilesToRoutableTiles(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to RoutableTiles no encoding',(done)=>{
            expect.hasAssertions();
            routableTilesToRoutableTilesNoEncoding(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to RoutableTiles no encoding no proj',(done)=>{
            expect.hasAssertions();
            routableTilesToRoutableTilesNoEncoding(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests same database Wegenregister",()=>{
        test('demo wegenregister to wegenregister',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregister(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no proj',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregister(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no encoding',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoEncoding(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no encoding no proj',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoEncoding(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests wegenregister only lines longer than 5 meter",()=>{
        test('demo wegenregister to wegenregister NoShortLines',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoShortLines(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no proj NoShortLines',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoShortLines(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no encoding NoShortLines',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoEncodingNoShortLines(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no encoding no proj NoShortLines',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoEncodingNoShortLines(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });
});



describe.skip("tests using configProperties in meter",()=>{
    beforeEach(()=>{
        configProperties.internalPrecision = internalPrecisionEnum.METER;
        configProperties.bearDist = 20;
    });

    describe("tests different databases osm to reg",()=>{
        test('demo osm to wegenregister no proj',(done)=>{
            expect.hasAssertions();
            osmToWegenregister(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to wegenregister always proj',(done)=>{
            expect.hasAssertions();
            osmToWegenregister(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to wegenregister no enc no proj',(done)=>{
            expect.hasAssertions();
            osmToWegenregisterNoEnc(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to wegenregister no enc always proj',(done)=>{
            expect.hasAssertions();
            osmToWegenregisterNoEnc(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests different databases osm to rt",()=>{
        test('demo osm to RoutableTiles no proj',(done)=>{
            expect.hasAssertions();
            osmToRoutableTiles(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to RoutableTiles always proj',(done)=>{
            expect.hasAssertions();
            osmToRoutableTiles(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to RoutableTiles no enc no proj',(done)=>{
            expect.hasAssertions();
            osmToRoutableTilesNoEnc(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to RoutableTiles no enc always proj',(done)=>{
            expect.hasAssertions();
            osmToRoutableTilesNoEnc(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests different databases rt to reg",()=>{
        test('demo RoutableTiles to wegenregister no proj',(done)=>{
            expect.hasAssertions();
            routableTilesToWegenregister(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to wegenregister always proj',(done)=>{
            expect.hasAssertions();
            routableTilesToWegenregister(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to wegenregister no enc no proj',(done)=>{
            expect.hasAssertions();
            routableTilesToWegenregisterNoEnc(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to wegenregister no enc always proj',(done)=>{
            expect.hasAssertions();
            routableTilesToWegenregisterNoEnc(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests same database OSM",()=>{
        test('demo osm to osm',(done)=>{
            expect.hasAssertions();
            osmToOsm(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to osm no proj',(done)=>{
            expect.hasAssertions();
            osmToOsm(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to osm no encoding',(done)=>{
            expect.hasAssertions();
            osmToOsmNoEncoding(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo osm to osm no encoding no proj',(done)=>{
            expect.hasAssertions();
            osmToOsmNoEncoding(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests same database Routable Tiles",()=>{
        test('demo wegenregister to wegenregister',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregister(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no proj',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregister(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no encoding',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoEncoding(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no encoding no proj',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoEncoding(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests same database Wegenregister",()=>{
        test('demo RoutableTiles to RoutableTiles',(done)=>{
            expect.hasAssertions();
            routableTilesToRoutableTiles(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to RoutableTiles no proj',(done)=>{
            expect.hasAssertions();
            routableTilesToRoutableTiles(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to RoutableTiles no encoding',(done)=>{
            expect.hasAssertions();
            routableTilesToRoutableTilesNoEncoding(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo RoutableTiles to RoutableTiles no encoding no proj',(done)=>{
            expect.hasAssertions();
            routableTilesToRoutableTilesNoEncoding(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    describe("tests wegenregister only lines longer than 5 meter",()=>{
        test('demo wegenregister to wegenregister NoShortLines',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoShortLines(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no proj NoShortLines',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoShortLines(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no encoding NoShortLines',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoEncodingNoShortLines(decoderPropertiesAlwaysProj).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
        test('demo wegenregister to wegenregister no encoding no proj NoShortLines',(done)=>{
            expect.hasAssertions();
            wegenregisterToWegenregisterNoEncodingNoShortLines(decoderProperties).then((res)=>{
                console.log(res);
                expect(res).toBeDefined();
                done();
            });
        },60000);
    });

    afterEach(()=>{
        configProperties.internalPrecision = internalPrecisionEnum.CENTIMETER;
        configProperties.bearDist = 2000;
    });
});