mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
Introduce examples/sample-app/spec.ts — a minimal property-based spec that taps the sample app's "Click me" button and asserts click_count is monotonic. Bundle-check and the trace writer test now reference the new path.
31 lines
625 B
Go
31 lines
625 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"path/filepath"
|
|
|
|
"github.com/priyanshujain/uatu/internal/bundler"
|
|
)
|
|
|
|
func main() {
|
|
repoRoot, err := os.Getwd()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "getwd: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
specApiPath := filepath.Join(repoRoot, "pkg/spec-api/src/index.ts")
|
|
|
|
result, err := bundler.Bundle(bundler.Options{
|
|
EntryFile: "examples/sample-app/spec.ts",
|
|
Aliases: map[string]string{
|
|
"@uatu/spec": specApiPath,
|
|
},
|
|
})
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "bundle: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
fmt.Printf("bundled: %d bytes, sha256=%s\n", len(result.JavaScript), result.SHA256)
|
|
}
|