Skip to content

Commit

Permalink
fix(rgpd): add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Sep 6, 2022
1 parent acdda29 commit d36beff
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
22 changes: 22 additions & 0 deletions declaration-rgpd/__test__/__snapshots__/analyseFile.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,28 @@ Array [
]
`;

exports[`lba: should return ml and pc 1`] = `
Array [
Object {
"declarationUrl": "https://labonnealternance.apprentissage.beta.gouv.fr/mentions-legales",
"maxScore": 4,
"mention": "Mentions légales",
"missingTrackers": Array [],
"missingWords": Array [],
"score": 4,
"slug": "ml",
},
Object {
"maxScore": 0,
"mention": null,
"missingTrackers": Array [],
"missingWords": Array [],
"score": 0,
"slug": "pc",
},
]
`;

exports[`ressourcerie: should return ml and pc 1`] = `
Array [
Object {
Expand Down
8 changes: 7 additions & 1 deletion declaration-rgpd/__test__/analyseFile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ test("1000jours-blues: should return ml and pc", async () => {
expect(output).toMatchSnapshot();
});

test("lba: should return ml and pc", async () => {
const output = await analyseFile("./__test__/samples/lba.html", {
url: "https://labonnealternance.apprentissage.beta.gouv.fr",
});
expect(output).toMatchSnapshot();
});

test("should return ml and pc and thirdparties data", async () => {
const thirdPartiesOutput = fs
.readFileSync("./__test__/samples/thirdparties.json")
Expand All @@ -33,7 +40,6 @@ test("should return ml and pc and thirdparties data", async () => {
});
expect(output).toMatchSnapshot();
});


test("should not detect ml nor pc", async () => {
const html = `Some content Without efficient, transparent bloatware, you will lack architectures. Quick: do you have a plan to become customized. Our feature set is unparalleled, but our sexy raw bandwidth and easy configuration is usually considered a terrific achievement. Imagine a combination of VOIP and Flash. What does the industry jargon '60/24/7/365' really mean? These innovations help CMOs challenged with the delivery of omnichannel digital experiences for some of the customer journey. We will disintermediate the power of returns-on-investment to monetize. Is it more important for something to be customer-directed? What does the industry jargon '60/24/7/365' really mean? Think granular. Without macro-vertical CAE, you will lack synergies. Our infinitely reconfigurable feature set is unparalleled, but our robust feature set, but our capability to upgrade. We think we know that if you integrate intuitively then you may also reintermediate magnetically. That is a remarkable achievement taking into account this month's financial state of things! If all of this may seem confounding to you, that's because it is! If you incentivize dynamically, you may have to exploit vertically. What do we brand? Anything and everything, regardless of semidarkness! Our technology takes the best aspects of VOIP and Dynamic HTML. These innovations help CMOs challenged with the delivery of omnichannel digital experiences for some of the customer journey.`;
Expand Down
1 change: 1 addition & 0 deletions declaration-rgpd/__test__/samples/lba.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion declaration-rgpd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if (require.main === module) {
analyseFile(filePath, { url, thirdPartiesOutput })
.then((result) => console.log(JSON.stringify(result)))
.catch((e) => {
//console.error(e);
console.error(e);
console.log(JSON.stringify({ declaration: undefined }));
});
}

0 comments on commit d36beff

Please sign in to comment.