xref: /third_party/node/test/addons/zlib-binding/test.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/addons/zlib-binding/
11cb0ef41Sopenharmony_ci// Flags: --force-context-aware
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ci'use strict';
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciconst common = require('../../common');
61cb0ef41Sopenharmony_ciconst assert = require('assert');
71cb0ef41Sopenharmony_ciconst zlib = require('zlib');
81cb0ef41Sopenharmony_ciconst binding = require(`./build/${common.buildType}/binding`);
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ciconst input = Buffer.from('Hello, World!');
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ciconst output = zlib.inflateRawSync(binding.compressBytes(input));
131cb0ef41Sopenharmony_ciassert.deepStrictEqual(input, output);
14

Indexes created Thu Nov 07 10:32:03 CST 2024