24 lines
450 B
Go
24 lines
450 B
Go
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
|
|
|
|
package fan
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestNewPackageSource(t *testing.T) {
|
|
s := NewPackage()
|
|
assert.NotNil(t, s)
|
|
}
|
|
|
|
func TestExtractPackages(t *testing.T) {
|
|
p := NewPackage()
|
|
assert.NotNil(t, p)
|
|
|
|
document, err := p.Extract(nil, nil)
|
|
assert.Nil(t, err)
|
|
assert.NotNil(t, document)
|
|
assert.Greater(t, document.Len(), 0)
|
|
}
|