<commit_before>/* eslint-disable handle-callback-err */

var test = require('tape');
var jsonp = require('.');

var opts = { timeout: 5000 };

test('injects a script', opts, function (t) {
  jsonp('https://jsfiddle.net/echo/jsonp', t.end);
  t.ok(document.querySelector('script[src^="https://jsfiddle.net/echo/jsonp?callback=j"]'));
});

test('respects query parameters', opts, function (t) {
  jsonp('https://jsfiddle.net/echo/jsonp?foo=bar', t.end);
  t.ok(document.querySelector('script[src^="https://jsfiddle.net/echo/jsonp?foo=bar&callback=j"]'));
});

test('handles simultaneous requests', opts, function (t) {
  t.plan(2);

  jsonp('https://jsfiddle.net/echo/jsonp?foo=bar&delay=1', function (err, data) {
    t.deepEqual(data, {foo: 'bar'});
  });

  jsonp('https://jsfiddle.net/echo/jsonp?baz=qux', function (err, data) {
    t.deepEqual(data, {baz: 'qux'});
  });
});
<commit_msg>Remove spaces inside curly brackets<commit_after>/* eslint-disable handle-callback-err */

var test = require('tape');
var jsonp = require('.');

var opts = {timeout: 5000};

test('injects a script', opts, function (t) {
  jsonp('https://jsfiddle.net/echo/jsonp', t.end);
  t.ok(document.querySelector('script[src^="https://jsfiddle.net/echo/jsonp?callback=j"]'));
});

test('respects query parameters', opts, function (t) {
  jsonp('https://jsfiddle.net/echo/jsonp?foo=bar', t.end);
  t.ok(document.querySelector('script[src^="https://jsfiddle.net/echo/jsonp?foo=bar&callback=j"]'));
});

test('handles simultaneous requests', opts, function (t) {
  t.plan(2);

  jsonp('https://jsfiddle.net/echo/jsonp?foo=bar&delay=1', function (err, data) {
    t.deepEqual(data, {foo: 'bar'});
  });

  jsonp('https://jsfiddle.net/echo/jsonp?baz=qux', function (err, data) {
    t.deepEqual(data, {baz: 'qux'});
  });
});

{'fraction_non_alphanumeric': 0.22333333333333333, 'fraction_numerical': 0.006666666666666667, 'mean_word_length': 5.105084745762712, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, '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': '1227820', 'n_tokens_mistral': 686, 'n_tokens_neox': 646, 'n_words': 108}