Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Rename current to nodejs_v8 #6

Merged
merged 1 commit into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ import org.scalatest.FunSpec

/**
* File System (Fs) Tests
*
* @author [email protected]
*/
class FsTest extends FunSpec {

val TEST_RESOURCES = "./app/nodejs_v8/src/test/resources/"

describe("Fs") {

it("supports watching files") {
val watcher = Fs.watch("./app/current/src/test/resources/", (eventType, file) => {
val watcher = Fs.watch(s"${TEST_RESOURCES}", (eventType, file) => {
info(s"watcher: eventType = '$eventType' file = '$file'")
})
info(s"watcher: ${Util.inspect(watcher)}")

setImmediate(
() =>
Fs.writeFile("./app/current/src/test/resources/1.txt", "Hello", error => {
Fs.writeFile(s"${TEST_RESOURCES}1.txt", "Hello", error => {
if (isDefined(error)) {
alert(s"error: ${JSON.stringify(error)}")
}
Expand All @@ -31,9 +34,9 @@ class FsTest extends FunSpec {
}

it("should stream data") {
val file1 = "./app/current/src/test/resources/fileA1.txt"
val file2 = "./app/current/src/test/resources/fileA2.txt"
val file3 = "./app/current/src/test/resources/fileC2.txt"
val file1 = s"${TEST_RESOURCES}fileA1.txt"
val file2 = s"${TEST_RESOURCES}fileA2.txt"
val file3 = s"${TEST_RESOURCES}fileC2.txt"

val readable = Fs.createReadStream(file1)
val writable = Fs.createWriteStream(file2)
Expand All @@ -58,8 +61,8 @@ class FsTest extends FunSpec {
}

it("should pipe data from a Readable to a Writable") {
val file1 = "./app/current/src/test/resources/fileB1.txt"
val file2 = "./app/current/src/test/resources/fileB2.txt"
val file1 = s"${TEST_RESOURCES}fileB1.txt"
val file2 = s"${TEST_RESOURCES}fileB2.txt"

val readable = Fs.createReadStream(file1)
val writable = Fs.createWriteStream(file2)
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ lazy val commonMacroParadiseSetting = Seq(
)

lazy val root = (project in file("."))
.aggregate(core, common, current)
.aggregate(core, common, nodejs_v8)

lazy val core = (project in file("./core"))
.enablePlugins(ScalaJSPlugin)
Expand Down Expand Up @@ -77,7 +77,7 @@ lazy val common = (project in file("./app/common"))
.settings(commonMacroParadiseSetting)
.dependsOn(core)

lazy val current = (project in file("./app/current"))
lazy val nodejs_v8 = (project in file("./app/nodejs_v8"))
.dependsOn(common)
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
Expand Down