Sha256: 8fbd616f4a08b54858e6053f8773f9de944ce2a836f5aa4f84413342103285d3

Contents?: true

Size: 492 Bytes

Versions: 11

Compression:

Stored size: 492 Bytes

Contents

# Copied from cruby and modified to skip unsupported syntaxes
require 'test/unit'
require 'nodejs'
require 'nodejs/dir'

class TestNodejsDir < Test::Unit::TestCase
  def test_dir_entries
    path = "/tmp/testing_nodejs_dir_implementation_#{Time.now.to_i}"
    Dir.mkdir(path)
    result = Dir.entries(path)
    assert_equal(result.length, 0)
    File.open(path + '/bar', "w") {}
    File.open(path + '/baz', "w") {}
    result = Dir.entries(path)
    assert_equal(result.length, 2)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
opal-0.10.6 test/nodejs/test_dir.rb
opal-0.10.6.beta test/nodejs/test_dir.rb
opal-0.10.5 test/nodejs/test_dir.rb
opal-0.10.4 test/nodejs/test_dir.rb
opal-0.11.0.rc1 test/nodejs/test_dir.rb
opal-0.10.3 test/nodejs/test_dir.rb
opal-0.10.2 test/nodejs/test_dir.rb
opal-0.10.1 test/nodejs/test_dir.rb
opal-0.10.0 test/nodejs/test_dir.rb
opal-0.10.0.rc2 test/nodejs/test_dir.rb
opal-0.10.0.rc1 test/nodejs/test_dir.rb