You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/test/App/API.purs
+10-14Lines changed: 10 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -137,13 +137,11 @@ spec = do
137
137
138
138
caseMap.lookup version effectMetadata.published of
139
139
Nothing->Except.throw $ "Expected " <> formatPackageVersion name version <> " to be in metadata."
140
-
Just published ->case published.compilers of
141
-
Left one ->Except.throw $ "Expected " <> formatPackageVersion name version <> " to have a compiler matrix but unfinished single version: " <> Version.print one
142
-
Right many ->do
143
-
let many' = NonEmptyArray.toArray many
144
-
let expected = map Utils.unsafeVersion [ "0.15.3", "0.15.4", "0.15.5" ]
145
-
unless (many' == expected) do
146
-
Except.throw $ "Expected " <> formatPackageVersion name version <> " to have a compiler matrix of " <> Utils.unsafeStringify (map Version.print expected) <> " but got " <> Utils.unsafeStringify (map Version.print many')
140
+
Just published ->do
141
+
let many' = NonEmptyArray.toArray published.compilers
142
+
let expected = map Utils.unsafeVersion [ "0.15.3", "0.15.4", "0.15.5" ]
143
+
unless (many' == expected) do
144
+
Except.throw $ "Expected " <> formatPackageVersion name version <> " to have a compiler matrix of " <> Utils.unsafeStringify (map Version.print expected) <> " but got " <> Utils.unsafeStringify (map Version.print many')
147
145
148
146
-- Finally, we can verify that publishing the package again should fail
149
147
-- since it already exists.
@@ -186,13 +184,11 @@ spec = do
186
184
187
185
caseMap.lookup transitive.version transitiveMetadata.published of
188
186
Nothing->Except.throw $ "Expected " <> formatPackageVersion transitive.name transitive.version <> " to be in metadata."
189
-
Just published ->case published.compilers of
190
-
Left one ->Except.throw $ "Expected " <> formatPackageVersion transitive.name transitive.version <> " to have a compiler matrix but unfinished single version: " <> Version.print one
191
-
Right many ->do
192
-
let many' = NonEmptyArray.toArray many
193
-
let expected = map Utils.unsafeVersion [ "0.15.3", "0.15.4", "0.15.5" ]
194
-
unless (many' == expected) do
195
-
Except.throw $ "Expected " <> formatPackageVersion transitive.name transitive.version <> " to have a compiler matrix of " <> Utils.unsafeStringify (map Version.print expected) <> " but got " <> Utils.unsafeStringify (map Version.print many')
187
+
Just published ->do
188
+
let many' = NonEmptyArray.toArray published.compilers
189
+
let expected = map Utils.unsafeVersion [ "0.15.3", "0.15.4", "0.15.5" ]
190
+
unless (many' == expected) do
191
+
Except.throw $ "Expected " <> formatPackageVersion transitive.name transitive.version <> " to have a compiler matrix of " <> Utils.unsafeStringify (map Version.print expected) <> " but got " <> Utils.unsafeStringify (map Version.print many')
196
192
197
193
Registry.readManifest transitive.name transitive.version >>= case _ of
198
194
Nothing->Except.throw $ "Expected " <> PackageName.print transitive.name <> " to be in manifest index."
0 commit comments