-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor monorepo tests to use fixtures (#1197)
- Loading branch information
Showing
91 changed files
with
1,004 additions
and
507 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
test-fixtures/monorepo/1161-regression/package-b/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package: | ||
name: package-b | ||
dependencies: | ||
- either | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.B | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/1161-regression/package-b/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Src.PACKAGE.B where | ||
|
||
import Prelude | ||
import Data.Either | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> EITHER.packageNameValue | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-b" |
12 changes: 12 additions & 0 deletions
12
test-fixtures/monorepo/1161-regression/package-b/test/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Test.PACKAGE.B where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Src.PACKAGE.B as PACKAGE.B | ||
import Data.Either | ||
|
||
main :: Effect Unit | ||
main = do | ||
log $ "Test for " <> PACKAGE.B.packageNameValue <> EITHER.packageNameValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package: | ||
name: root | ||
dependencies: [] | ||
test: | ||
main: Test.Main | ||
dependencies: [] | ||
workspace: | ||
package_set: | ||
registry: 20.0.1 | ||
extra_packages: | ||
either: | ||
git: https://github.com/purescript/purescript-either.git | ||
ref: af655a04ed2fd694b6688af39ee20d7907ad0763 | ||
dependencies: | ||
- control | ||
- invariant | ||
- maybe | ||
- prelude |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/case1-independent-packages/package-a/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package: | ||
name: package-a | ||
dependencies: | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.A | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
9 changes: 9 additions & 0 deletions
9
test-fixtures/monorepo/case1-independent-packages/package-a/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Src.PACKAGE.A where | ||
|
||
import Prelude | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> "no deps" | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-a" |
11 changes: 11 additions & 0 deletions
11
test-fixtures/monorepo/case1-independent-packages/package-a/test/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Test.PACKAGE.A where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Src.PACKAGE.A as PACKAGE.A | ||
|
||
main :: Effect Unit | ||
main = do | ||
log $ "Test for " <> PACKAGE.A.packageNameValue <> "no deps" |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/case1-independent-packages/package-b/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package: | ||
name: package-b | ||
dependencies: | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.B | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
9 changes: 9 additions & 0 deletions
9
test-fixtures/monorepo/case1-independent-packages/package-b/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Src.PACKAGE.B where | ||
|
||
import Prelude | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> "no deps" | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-b" |
11 changes: 11 additions & 0 deletions
11
test-fixtures/monorepo/case1-independent-packages/package-b/test/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Test.PACKAGE.B where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Src.PACKAGE.B as PACKAGE.B | ||
|
||
main :: Effect Unit | ||
main = do | ||
log $ "Test for " <> PACKAGE.B.packageNameValue <> "no deps" |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/case1-independent-packages/package-c/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package: | ||
name: package-c | ||
dependencies: | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.C | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
9 changes: 9 additions & 0 deletions
9
test-fixtures/monorepo/case1-independent-packages/package-c/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Src.PACKAGE.C where | ||
|
||
import Prelude | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> "no deps" | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-c" |
11 changes: 11 additions & 0 deletions
11
test-fixtures/monorepo/case1-independent-packages/package-c/test/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Test.PACKAGE.C where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Src.PACKAGE.C as PACKAGE.C | ||
|
||
main :: Effect Unit | ||
main = do | ||
log $ "Test for " <> PACKAGE.C.packageNameValue <> "no deps" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
workspace: | ||
package_set: | ||
registry: 0.0.1 | ||
extra_packages: {} |
11 changes: 11 additions & 0 deletions
11
test-fixtures/monorepo/case2-shared-dependencies1/package-a/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package: | ||
name: package-a | ||
dependencies: | ||
- package-shared | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.A | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/case2-shared-dependencies1/package-a/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Src.PACKAGE.A where | ||
|
||
import Prelude | ||
import Src.PACKAGE.SHARED as PACKAGE.SHARED | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> PACKAGE.SHARED.packageNameValue | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-a" |
12 changes: 12 additions & 0 deletions
12
test-fixtures/monorepo/case2-shared-dependencies1/package-a/test/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Test.PACKAGE.A where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Src.PACKAGE.A as PACKAGE.A | ||
import Src.PACKAGE.SHARED as PACKAGE.SHARED | ||
|
||
main :: Effect Unit | ||
main = do | ||
log $ "Test for " <> PACKAGE.A.packageNameValue <> PACKAGE.SHARED.packageNameValue |
11 changes: 11 additions & 0 deletions
11
test-fixtures/monorepo/case2-shared-dependencies1/package-b/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package: | ||
name: package-b | ||
dependencies: | ||
- package-shared | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.B | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/case2-shared-dependencies1/package-b/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Src.PACKAGE.B where | ||
|
||
import Prelude | ||
import Src.PACKAGE.SHARED as PACKAGE.SHARED | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> PACKAGE.SHARED.packageNameValue | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-b" |
12 changes: 12 additions & 0 deletions
12
test-fixtures/monorepo/case2-shared-dependencies1/package-b/test/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Test.PACKAGE.B where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Src.PACKAGE.B as PACKAGE.B | ||
import Src.PACKAGE.SHARED as PACKAGE.SHARED | ||
|
||
main :: Effect Unit | ||
main = do | ||
log $ "Test for " <> PACKAGE.B.packageNameValue <> PACKAGE.SHARED.packageNameValue |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/case2-shared-dependencies1/package-shared/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package: | ||
name: package-shared | ||
dependencies: | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.SHARED | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
9 changes: 9 additions & 0 deletions
9
test-fixtures/monorepo/case2-shared-dependencies1/package-shared/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Src.PACKAGE.SHARED where | ||
|
||
import Prelude | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> "no deps" | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-shared" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
workspace: | ||
package_set: | ||
registry: 0.0.1 | ||
extra_packages: {} |
12 changes: 12 additions & 0 deletions
12
test-fixtures/monorepo/case3-shared-dependencies2/package-a/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package: | ||
name: package-a | ||
dependencies: | ||
- package-b | ||
- package-c | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.A | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
11 changes: 11 additions & 0 deletions
11
test-fixtures/monorepo/case3-shared-dependencies2/package-a/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Src.PACKAGE.A where | ||
|
||
import Prelude | ||
import Src.PACKAGE.C as PACKAGE.C | ||
import Src.PACKAGE.B as PACKAGE.B | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> PACKAGE.C.packageNameValue <> PACKAGE.B.packageNameValue | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-a" |
13 changes: 13 additions & 0 deletions
13
test-fixtures/monorepo/case3-shared-dependencies2/package-a/test/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Test.PACKAGE.A where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Src.PACKAGE.A as PACKAGE.A | ||
import Src.PACKAGE.C as PACKAGE.C | ||
import Src.PACKAGE.B as PACKAGE.B | ||
|
||
main :: Effect Unit | ||
main = do | ||
log $ "Test for " <> PACKAGE.A.packageNameValue <> PACKAGE.C.packageNameValue <> PACKAGE.B.packageNameValue |
11 changes: 11 additions & 0 deletions
11
test-fixtures/monorepo/case3-shared-dependencies2/package-b/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package: | ||
name: package-b | ||
dependencies: | ||
- package-c | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.B | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/case3-shared-dependencies2/package-b/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Src.PACKAGE.B where | ||
|
||
import Prelude | ||
import Src.PACKAGE.C as PACKAGE.C | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> PACKAGE.C.packageNameValue | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-b" |
12 changes: 12 additions & 0 deletions
12
test-fixtures/monorepo/case3-shared-dependencies2/package-b/test/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Test.PACKAGE.B where | ||
|
||
import Prelude | ||
|
||
import Effect (Effect) | ||
import Effect.Console (log) | ||
import Src.PACKAGE.B as PACKAGE.B | ||
import Src.PACKAGE.C as PACKAGE.C | ||
|
||
main :: Effect Unit | ||
main = do | ||
log $ "Test for " <> PACKAGE.B.packageNameValue <> PACKAGE.C.packageNameValue |
10 changes: 10 additions & 0 deletions
10
test-fixtures/monorepo/case3-shared-dependencies2/package-c/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package: | ||
name: package-c | ||
dependencies: | ||
- prelude | ||
test: | ||
main: Test.PACKAGE.C | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude |
9 changes: 9 additions & 0 deletions
9
test-fixtures/monorepo/case3-shared-dependencies2/package-c/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Src.PACKAGE.C where | ||
|
||
import Prelude | ||
|
||
libraryUsage :: String | ||
libraryUsage = packageNameValue <> "no deps" | ||
|
||
packageNameValue :: String | ||
packageNameValue = "package name " <> "package-c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
workspace: | ||
package_set: | ||
registry: 0.0.1 | ||
extra_packages: {} |
4 changes: 4 additions & 0 deletions
4
test-fixtures/monorepo/ensure-ranges-no-root-package/non-root-package-a/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package: | ||
name: non-root-package-a | ||
dependencies: | ||
- prelude |
6 changes: 6 additions & 0 deletions
6
test-fixtures/monorepo/ensure-ranges-no-root-package/non-root-package-a/src/Main.purs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Subpackage.NON.ROOT.PACKAGE.A where | ||
|
||
import Prelude | ||
|
||
packageName :: String | ||
packageName = "package" <> "non-root-package-a" |
4 changes: 4 additions & 0 deletions
4
test-fixtures/monorepo/ensure-ranges-no-root-package/non-root-package-b/spago.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package: | ||
name: non-root-package-b | ||
dependencies: | ||
- prelude |
Oops, something went wrong.