File: independent_deps_test.js

package info (click to toggle)
golang-github-google-flatbuffers 24.12.23-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 17,704 kB
  • sloc: cpp: 53,217; python: 6,900; cs: 5,566; java: 4,370; php: 1,460; javascript: 1,061; xml: 1,016; sh: 886; makefile: 13
file content (18 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This test has nothing to do with flatbuffers. It only exists to validate
// that other projects can use their own set of dependencies without having to
// explicitly pull in flatbuffers's dependencies.
//
// We pick lodash here not for any particular reason. It could be any package,
// really. I chose it because it's a relatively simple package.

import assert from 'node:assert/strict'

import _ from 'lodash'

function main() {
  console.log(_);
  assert.deepStrictEqual(_.defaults({ 'a': 1 }, { 'a': 3, 'b': 2 }), { 'a': 1, 'b': 2 });
  assert.deepStrictEqual(_.partition([1, 2, 3, 4], n => n % 2), [[1, 3], [2, 4]]);
}

main();