Files: b1b65011b395cada507b007a22398f4ad4d3f532 / test / weird.js
1617 bytesRaw
1 | var expected = "lFluepOmDxEUcZWlLfz0rHU61xLQYxknAEd6z4un8P8=.sha256" |
2 | var msg = { |
3 | "previous": "%VBfEJjeNUlxLuK0eyRzVha3TLu5PPWLwsvGgnmAdPas=.sha256", |
4 | "author": "@/02iw6SFEPIHl8nMkYSwcCgRWxiG6VP547Wcp1NW8Bo=.ed25519", |
5 | "sequence": 2888, |
6 | "timestamp": 1457679971682, |
7 | "hash": "sha256", |
8 | "content": { |
9 | "type": "post", |
10 | "text": "oh no\n\nhttps://medium.com/making-instapaper/bookmarklets-are-dead-d470d4bbb626\n\n> The ultimate catch-22 of the new Content Security Policy wording is that it’s intended to benefit the users, by providing additional security from hypothetical malicious add-ons on websites that enforce a Content Security Policy. In the end the bookmarklet has been relegated obsolete by the change, a casualty of one clause in one section of one web specification, and end-users and developers are the ones who will mourn its demise. The path to hell is paved with good intentions.\n\n> I’d probably try to do more about it, but I’m too busy rewriting Instapaper’s bookmarklet into extensions for every major browser.\n\nhttps://www.youtube.com/watch?v=n5diMImYIIA", |
11 | "root": "%VBfEJjeNUlxLuK0eyRzVha3TLu5PPWLwsvGgnmAdPas=.sha256", |
12 | "branch": "%VBfEJjeNUlxLuK0eyRzVha3TLu5PPWLwsvGgnmAdPas=.sha256", |
13 | "channel": "javascript" |
14 | }, |
15 | "signature": "Pv+LWJumKE8nIOfsZxgMcg/EcR/tZeJShmiVIGizERuiAMzwzTTjg78r+InmJopJwMogEG7/W3FLTnH/EOzLCg==.sig.ed25519" |
16 | } |
17 | |
18 | |
19 | var tape = require('tape') |
20 | var ssbKeys = require('../') |
21 | |
22 | tape('test that the legacy code is as expected', function (t) { |
23 | var actual = ssbKeys.hash(JSON.stringify(msg, null, 2)) |
24 | t.equal(actual, expected) |
25 | t.end() |
26 | }) |
27 | |
28 | |
29 | |
30 | |
31 |
Built with git-ssb-web