jx/internal/source/dir_test.go

24 lines
413 B
Go
Raw Normal View History

2024-04-18 00:07:12 +00:00
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package source
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestNewDirSource(t *testing.T) {
s := NewDir()
assert.NotNil(t, s)
}
func TestExtractDirectory(t *testing.T) {
s := NewDir()
assert.NotNil(t, s)
document, err := s.ExtractDirectory(TempDir)
assert.Nil(t, err)
assert.NotNil(t, document)
}