// 'use strict';

// const expect = require('chai').expect;
// const createVCD = require('../out/vcd.js');
// const webVcdParser = require('../lib/web-vcd-parser.js');

// describe('wasm any', function () {

//   it('simple any', function (done) {
//     createVCD().then(mod => {
//       webVcdParser(mod).then(inst => {
//         const dump = [];

//         inst.change.any((id, time, cmd, value, mask) => {
//           dump.push({
//             id, time, cmd, value, mask
//           });
//         });

//         inst.on('finish', () => {
//           expect(dump).to.deep.eq([
//             { id: 'ABC', time: 100n, cmd: 14, value: undefined, mask: undefined },
//             { id: '123', time: 200n, cmd: 15, value: undefined, mask: undefined },
//             { id: 'XyZ', time: 300n, cmd: 14, value: undefined, mask: undefined },
//             { id: '64b',    time: 400n, cmd: 30, value: 0xaaaaaaaaaaaaaaaan, mask: 0n },
//             { id: '128b',   time: 400n, cmd: 30, value: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaan, mask: 0n },
//             { id: '256b',   time: 400n, cmd: 30, value: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaan, mask: 0n },
//             { id: '512b',   time: 400n, cmd: 30, value: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaan, mask: 0n },
//             { id: '1024b',  time: 400n, cmd: 30, value: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaan, mask: 0n },
//             { id: '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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaan, mask: 0n },
//             { id: '16kb',  time: 400n, cmd: 30, value: [encoded data, 4099 characters], mask: 0n },
//             { id: '32kb',  time: 400n, cmd: 30, value: [encoded data, 8195 characters], mask: 0n },
//             { id: '64kb',  time: 400n, cmd: 30, value: [encoded data, 16387 characters], mask: 0n },
//             { id: '68b', time: 400n, cmd: 30, value: 0xf0ff00000000000000fn, mask: 0xff00000000000000000n },
//             { id: 'foo', time: 400n, cmd: 15, value: undefined, mask: undefined }
//           ]);
//           done();
//         });

//         inst.write(`\
// $enddefinitions $end
// #100
// 0ABC
// #200
// 1123
// #300
// 0XyZ
// #400
// b1010101010101010101010101010101010101010101010101010101010101010 64b
// b0001010101010xx010101000000ggg
// b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 128b
// b1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 256b
// b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 512b
// b1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 1024b
// b10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010 2048b
// [encoded data, 4097 characters] 4096b
// [encoded data, 8193 characters] 8192b
// [encoded data, 16385 characters] 16kb
// [encoded data, 32769 characters] 32kb
// [encoded data, 65537 characters] 64kb
// bzzzzxxxx11111111000000000000000000000000000000000000000000000000000000001111 68b
// 1foo
// `);
//         inst.end();
//       });
//     });
//   });
// });

// /* eslint-env mocha */
