@@ -4,42 +4,14 @@ describe("extractPeLoaderDataFromHtml Tests", () => {
4
4
it ( "must detect pe-loader-data-cache tags in given HTML" , async ( ) => {
5
5
const results = extractPeLoaderDataFromHtml ( TEST_STRING ) ;
6
6
7
+ // The value is not decompressed, so it's still a string.
7
8
expect ( results ) . toEqual ( [
8
9
{
9
10
key : "GfT8AoRsYT-1238102521" ,
10
- value : [
11
- {
12
- description :
13
- "The Falcon 1 was an expendable launch system privately developed and manufactured by SpaceX during 2006-2009. On 28 September 2008, Falcon 1 became the first privately-developed liquid-fuel launch vehicle to go into orbit around the Earth." ,
14
- id : "5e9d0d95eda69955f709d1eb" ,
15
- name : "Falcon 1" ,
16
- wikipedia : "https://en.wikipedia.org/wiki/Falcon_1"
17
- } ,
18
- {
19
- description :
20
- "Falcon 9 is a two-stage rocket designed and manufactured by SpaceX for the reliable and safe transport of satellites and the Dragon spacecraft into orbit." ,
21
- id : "5e9d0d95eda69973a809d1ec" ,
22
- name : "Falcon 9" ,
23
- wikipedia : "https://en.wikipedia.org/wiki/Falcon_9"
24
- } ,
25
- {
26
- description :
27
- "With the ability to lift into orbit over 54 metric tons (119,000 lb)--a mass equivalent to a 737 jetliner loaded with passengers, crew, luggage and fuel--Falcon Heavy can lift more than twice the payload of the next closest operational vehicle, the Delta IV Heavy, at one-third the cost." ,
28
- id : "5e9d0d95eda69974db09d1ed" ,
29
- name : "Falcon Heavy" ,
30
- wikipedia : "https://en.wikipedia.org/wiki/Falcon_Heavy"
31
- } ,
32
- {
33
- description :
34
- "Starship and Super Heavy Rocket represent a fully reusable transportation system designed to service all Earth orbit needs as well as the Moon and Mars. This two-stage vehicle — composed of the Super Heavy rocket (booster) and Starship (ship) — will eventually replace Falcon 9, Falcon Heavy and Dragon." ,
35
- id : "5e9d0d96eda699382d09d1ee" ,
36
- name : "Starship" ,
37
- wikipedia : "https://en.wikipedia.org/wiki/SpaceX_Starship"
38
- }
39
- ]
11
+ value : "pe_NobwRAJgpgzgxgJwJYAcAuSD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CQioqmqGpavpUAbFs5AAMMAEUAEMAAGQwAKWQ9BqMGJHyeGcYtW1tmJYYOp6pc74iC9KilIBTX5HVMANWQ75U6gZMQzD8OsAeelQCY55SLQE0DZIjo1PFZA/gLdTY/Z5OJpqOA+YWvz/IFySxOWlbVjkESAgCCLoh8LbogQtUfQ1yXdr26X9llQ4jilPbjuynKFT4fj+HyBv1agi4ALpAA=="
40
12
}
41
13
] ) ;
42
14
} ) ;
43
15
} ) ;
44
16
45
- const TEST_STRING = `...<li><h1>Starship</h1><div>Starship and Super Heavy Rocket represent a fully reusable transportation system designed to service all Earth orbit needs as well as the Moon and Mars. This two-stage vehicle — composed of the Super Heavy rocket (booster) and Starship (ship) — will eventually replace Falcon 9, Falcon Heavy and Dragon.</div><br><div>More info at <a href="https://en.wikipedia.org/wiki/SpaceX_Starship" target="_blank" rel="noreferrer">https://en.wikipedia.org/wiki/SpaceX_Starship</a></div></li></ul></pb-spacex></pb-cell></pb-grid></pb-block></pb-document></main><footer data-testid="pb-footer" class="wby-1lh86qf"><div class="wby-xv6w56"><div class="logo wby-1i3ok2b"><a href="/"></a><div class="copy">DEVR © 2024</div></div></div></footer></div></div><pe-loader-data-cache data-key="GfT8AoRsYT-1238102521" data-value="[{"id":"5e9d0d95eda69955f709d1eb","name":"Falcon 1","description":"The Falcon 1 was an expendable launch system privately developed and manufactured by SpaceX during 2006-2009. On 28 September 2008, Falcon 1 became the first privately-developed liquid-fuel launch vehicle to go into orbit around the Earth.","wikipedia":"https://en.wikipedia.org/wiki/Falcon_1"},{"id":"5e9d0d95eda69973a809d1ec","name":"Falcon 9","description":"Falcon 9 is a two-stage rocket designed and manufactured by SpaceX for the reliable and safe transport of satellites and the Dragon spacecraft into orbit.","wikipedia":"https://en.wikipedia.org/wiki/Falcon_9"},{"id":"5e9d0d95eda69974db09d1ed","name":"Falcon Heavy","description":"With the ability to lift into orbit over 54 metric tons (119,000 lb)--a mass equivalent to a 737 jetliner loaded with passengers, crew, luggage and fuel--Falcon Heavy can lift more than twice the payload of the next closest operational vehicle, the Delta IV Heavy, at one-third the cost.","wikipedia":"https://en.wikipedia.org/wiki/Falcon_Heavy"},{"id":"5e9d0d96eda699382d09d1ee","name":"Starship","description":"Starship and Super Heavy Rocket represent a fully reusable transportation system designed to service all Earth orbit needs as well as the Moon and Mars. This two-stage vehicle — composed of the Super Heavy rocket (booster) and Starship (ship) — will eventually replace Falcon 9, Falcon Heavy and Dragon.","wikipedia":"https://en.wikipedia.org/wiki/SpaceX_Starship"}]"></pe-loader-data-cache></body></html>` ;
17
+ const TEST_STRING = `...<li><h1>Starship</h1><div>Starship and Super Heavy Rocket represent a fully reusable transportation system designed to service all Earth orbit needs as well as the Moon and Mars. This two-stage vehicle — composed of the Super Heavy rocket (booster) and Starship (ship) — will eventually replace Falcon 9, Falcon Heavy and Dragon.</div><br><div>More info at <a href="https://en.wikipedia.org/wiki/SpaceX_Starship" target="_blank" rel="noreferrer">https://en.wikipedia.org/wiki/SpaceX_Starship</a></div></li></ul></pb-spacex></pb-cell></pb-grid></pb-block></pb-document></main><footer data-testid="pb-footer" class="wby-1lh86qf"><div class="wby-xv6w56"><div class="logo wby-1i3ok2b"><a href="/"></a><div class="copy">DEVR © 2024</div></div></div></footer></div></div><pe-loader-data-cache data-key="GfT8AoRsYT-1238102521" data-value="pe_NobwRAJgpgzgxgJwJYAcAuSD2A7MAuMAFQAsoACAMQEMAbOHMgRjIHcqYyrsyoAPFKNghUARjXI0qAV2xxiZGAE8YaKAFsyKZADcqqmorLRtUGpgEROQsmq5SAZlThopCKJZGGAyiidQAGkauSNgA5mQATAAMUQBsALTRUQCcAHRkAPLcEQAcZF5Q6OoiUAiRMTkANJS09NzMJXBUauRopGT2SAgqmjp6porxxqbm7mQ0SACOUkgQ8fZSpuPSsvImxEhw4mRomGSheyG7ZJgIIkhonAiYMpZt5ACiVAhtqWCVYLP4YACsUMkQKIQZJ/YSxZIgn72ADsKQgjCgIneYGwzSg32odAYjGRLCQAGtUO4kFRvs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