<commit_before>/*jshint sub:true, evil:true*/
/*globals global, Symbol, Promise*/

var syntaxTests = {
  "Promises": function(name, callback) {
    var promise = new Promise(function(resolve) {
      resolve("OK");
    });
    promise.then(function(result) {
      callback(name, result === "OK");
    });
  },
  "Arrow Functions": function(name, callback) {
    var fn = (new Function("return (x) => { return x + 1; };"))();
    callback(name, fn(1) === 2);
  },
  "Symbols": function(name, callback) {
    var sym1 = Symbol("foo");
    var sym2 = Symbol("foo");
    var x = {};
    x[sym1] = 1;
    x[sym2] = 2;<commit_msg>Add caniuse test for async/await<commit_after>/*jshint sub:true, evil:true*/
/*globals global, Symbol, Promise*/

var syntaxTests = {
  "async/await": function(name, callback) {
    var promise = new Promise(function(resolve) {
      resolve("OK");
    });
    var awaiter = new Function("return async function(p) {return await p;}")();
    awaiter(promise).then(function(result) {
      callback(name, result === "OK");
    });
  },
  "async/await (strict mode)": function(name, callback) {
    var promise = new Promise(function(resolve) {
      resolve("OK");
    });
    var awaiter = new Function("'use strict'; return async function(p) {return await p;}")();
    awaiter(promise).then(function(result) {
      callback(name, result === "OK");
    });
  },
  "Promises": function(name, callback) {
    var promise = new Promise(function(resolve) {
      resolve("OK");
    });
    promise.then(function(result) {
      callback(name, result === "OK");
    });
  },
  "Arrow Functions": function(name, callback) {
    var fn = (new Function("return (x) => { return x + 1; };"))();
    callback(name, fn(1) === 2);
  },
  "Symbols": function(name, callback) {
    var sym1 = Symbol("foo");
    var sym2 = Symbol("foo");
    var x = {};
    x[sym1] = 1;
    x[sym2] = 2;
{'fraction_non_alphanumeric': 0.1929362150764365, 'fraction_numerical': 0.009488666315234581, 'mean_word_length': 3.3136363636363635, 'pattern_counts': {'":': 8, '<': 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': '5354418', 'n_tokens_mistral': 629, 'n_tokens_neox': 626, 'n_words': 151}