<commit_before>udefine = require '../../dist/udefine'
{expect} = require 'chai'

# TODO: This test is not working yet
describe 'udefine commonjs dependencies', ->
  it 'multiple dependencies', (done) ->
    udefine.paths.commonjs.base = 'test/node'
    
    udefine.modules.add
      dep1: './dep1'
      dep2: './dep2'
    
    udefine 'nodetest', ['dep1', 'dep2'], (dep1, dep2) ->
      expect(dep1).to.be.a('object')
      expect(dep1).to.have.property('number')
      
      expect(dep2).to.be.a('function')
      
      num = dep1.number + dep2()
      
      expect(num).to.be.a('number')
      
      done()<commit_msg>Oh, actually this test is working<commit_after>udefine = require '../../dist/udefine'
{expect} = require 'chai'

describe 'udefine commonjs dependencies', ->
  it 'multiple dependencies', (done) ->
    udefine.paths.commonjs.base = 'test/node'
    
    udefine.modules.add
      dep1: './dep1'
      dep2: './dep2'
    
    udefine 'nodetest', ['dep1', 'dep2'], (dep1, dep2) ->
      expect(dep1).to.be.a('object')
      expect(dep1).to.have.property('number')
      
      expect(dep2).to.be.a('function')
      
      num = dep1.number + dep2()
      
      expect(num).to.be.a('number')
      
      done()
{'fraction_non_alphanumeric': 0.17732793522267207, 'fraction_numerical': 0.021052631578947368, 'mean_word_length': 2.377049180327869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1038652', 'n_tokens_mistral': 435, 'n_tokens_neox': 440, 'n_words': 81}