<commit_before>/*
 * function_call__throws_missing_args.js
 */
/* global test, expect */

const gi = require('../')
const Gtk = gi.require('Gtk', '3.0');

test('fills caller-allocated arguments', () => {
  expect(() => {
    Gtk.accelerator_get_label();
  }).toThrow();
})<commit_msg>fix test<commit_after>/*
 * function_call__throws_missing_args.js
 */

const gi = require('../')
const Gtk = gi.require('Gtk', '3.0');

let didThrow = false

try {
  Gtk.accelerator_get_label()
} catch (e) {
  didThrow = true
  console.assert(e instanceof TypeError)
  console.log('Got expected error:', e.message)
}

console.assert(didThrow)
{'fraction_non_alphanumeric': 0.18210862619808307, 'fraction_numerical': 0.006389776357827476, 'mean_word_length': 4.313559322033898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '6429108', 'n_tokens_mistral': 228, 'n_tokens_neox': 223, 'n_words': 45}