<commit_before>assert = require 'assert'
turbase = require './../coffee/turbase'

describe '#getTypes()', ->
  it 'should get all avaiable data types', (done) ->
    turbase.getTypes {},
      jsonp: (data) ->
        assert data.types instanceof Array, 'types should be an Array'
        assert.equal typeof data.count, 'number', 'count should be a number'
        assert.equal data.count, data.types.length, 'count should equal data.types.length'
        assert 'aktiviteter' in data.types, 'types should contain aktiviteter'
        assert 'bilder' in data.types, 'types should contain bilder'
        assert 'områder' in data.types, 'types should contain områder'
        assert 'steder' in data.types, 'types should contain steder'
        assert 'turer' in data.types, 'types should contain turer'
        done()

describe.skip '#get()', ->
  it 'should get without errors', (done) ->
    req =
      params:
        object: 'turer'
        id: 'abc'
    #turbase.get
    done()

describe.skip '#list()', ->
  it 'should list all the tings'

describe.skip '#insert()', ->
  it 'should insert all the things'

describe.skip '#update()', ->
  it 'should update all the things'

describe.skip '#updates()', ->
  it 'should updates all the things'

describe.skip '#delete()', ->
  it 'should delete all the things'
<commit_msg>Adds unit test for #list() in turbase<commit_after>assert = require 'assert'
turbase = require './../coffee/turbase'

describe '#getTypes()', ->
  it 'should get all avaiable data types', (done) ->
    turbase.getTypes {},
      jsonp: (data) ->
        assert data.types instanceof Array, 'types should be an Array'
        assert.equal typeof data.count, 'number', 'count should be a number'
        assert.equal data.count, data.types.length, 'count should equal data.types.length'
        assert 'aktiviteter' in data.types, 'types should contain aktiviteter'
        assert 'bilder' in data.types, 'types should contain bilder'
        assert 'områder' in data.types, 'types should contain områder'
        assert 'steder' in data.types, 'types should contain steder'
        assert 'turer' in data.types, 'types should contain turer'
        done()

describe.skip '#get()', ->
  it 'should get without errors', (done) ->
    req =
      params:
        object: 'turer'
        id: 'abc'
    #turbase.get
    done()

describe '#list()', ->
  it 'should list all the tings', (done) ->
    req =
      eier: 'dnt'
      query:
        limit: 1,
        offset: 0
      params:
        object: 'turer'

    turbase.list req,
      jsonp: (data) ->
        throw data if data instanceof Error

        console.log data
        #assert.equal data, {}
        done()

describe.skip '#insert()', ->
  it 'should insert all the things'

describe.skip '#update()', ->
  it 'should update all the things'

describe.skip '#updates()', ->
  it 'should updates all the things'

describe.skip '#delete()', ->
  it 'should delete all the things'

{'fraction_non_alphanumeric': 0.13018549747048905, 'fraction_numerical': 0.0006745362563237774, 'mean_word_length': 2.744949494949495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, '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': '2817348', 'n_tokens_mistral': 913, 'n_tokens_neox': 897, 'n_words': 315}