<commit_before>import loraPacket from "../src/lib";
import LoraPayload from "../src/lib/LoraPacket";
import { calculateMIC } from "../src/lib/mic";
import { decrypt, decryptFOpts } from "../src/lib/crypto";

describe("parse packets from github issue #18", () => {
  // https://pkg.go.dev/github.com/brocaar/lorawan#pkg-examples
  it("should parse packet #1", () => {
    const message_hex = "4084412505A3010009110308B33750F504D4B86A";

    const parsed = loraPacket.fromWire(Buffer.from(message_hex, "hex"));

    expect(parsed).not.toBeUndefined();<commit_msg>remove bogus attribution (#88)<commit_after>import loraPacket from "../src/lib";
import LoraPayload from "../src/lib/LoraPacket";
import { calculateMIC } from "../src/lib/mic";
import { decrypt, decryptFOpts } from "../src/lib/crypto";

describe("parse packets from github issue #18", () => {
  it("should parse packet #1", () => {
    const message_hex = "4084412505A3010009110308B33750F504D4B86A";

    const parsed = loraPacket.fromWire(Buffer.from(message_hex, "hex"));

    expect(parsed).not.toBeUndefined();
{'fraction_non_alphanumeric': 0.1655813953488372, 'fraction_numerical': 0.07069767441860465, 'mean_word_length': 4.633507853403142, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6778570', 'n_tokens_mistral': 407, 'n_tokens_neox': 350, 'n_words': 73}