<commit_before>if(typeof exports === 'object') {
	var assert = require("assert");
	var alasql = require('..');
	var DOMStorage = require("dom-storage");
//	global.localStorage = new DOMStorage("./test390.json", { strict: false, ws: '' });
};

/*
 This sample beased on SQLLOGICTEST
*/

describe('Test 403 REINDEX', function() {

  it('1. CREATE DATABASE',function(done){
    alasql('CREATE DATABASE test403;USE test403');
    done();
  });

	it('2. Create table and index before insert', function(done){
    alasql('CREATE TABLE one (a INT)');
    alasql('INSERT INTO one (a) VALUES (100), (200), (300)');
    alasql('CREATE INDEX xone ON one (a)')
    done();
  });

  it('3. Create table and index after insert', function(done){
    alasql('CREATE TABLE two (a INT)');
    alasql('INSERT INTO two (a) VALUES (100), (200), (300)');
    alasql('CREATE INDEX xtwo ON two (a)')
    done();
  });

  it('4. REINDEX', function(done){
    var res = alasql('REINDEX xone');
    assert(res==1);
    done();
  });
<commit_msg>Changed REINDEX test<commit_after>if(typeof exports === 'object') {
	var assert = require("assert");
	var alasql = require('..');
	var DOMStorage = require("dom-storage");
//	global.localStorage = new DOMStorage("./test390.json", { strict: false, ws: '' });
};

/*
 This sample beased on SQLLOGICTEST
*/

describe('Test 403 REINDEX', function() {

  it('1. CREATE DATABASE',function(done){
    alasql('CREATE DATABASE test403;USE test403');
    done();
  });

	it('2. Create table and index before insert', function(done){
    alasql('CREATE TABLE one (a INT)');
    alasql('CREATE INDEX xone ON one (a)')
    alasql('INSERT INTO one (a) VALUES (100), (200), (300)');
    done();
  });

  it('3. Create table and index after insert', function(done){
    alasql('CREATE TABLE two (a INT)');
    alasql('INSERT INTO two (a) VALUES (100), (200), (300)');
    alasql('CREATE INDEX xtwo ON two (a)')
    done();
  });

  it('4. REINDEX', function(done){
    var res = alasql('REINDEX xone');
    assert(res==1);
    var res = alasql('REINDEX xtwo');
    assert(res==1);
    done();
  });

{'fraction_non_alphanumeric': 0.18990956687291766, 'fraction_numerical': 0.033793431699190864, 'mean_word_length': 3.788154897494305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6563458', 'n_tokens_mistral': 785, 'n_tokens_neox': 720, 'n_words': 207}