Skip to content

Commit

Permalink
up tests to ReScript v11 (#905)
Browse files Browse the repository at this point in the history
* up tests to ReScript v11

* update tests

* adapt tests
  • Loading branch information
zth authored Jan 29, 2024
1 parent 7d9b33f commit 4653a00
Show file tree
Hide file tree
Showing 26 changed files with 229 additions and 200 deletions.
2 changes: 1 addition & 1 deletion analysis/src/Packages.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let makePathsForModule ~projectFilesAndPaths ~dependenciesFilesAndPaths =

let getReScriptVersion () =
(* TODO: Include patch stuff when needed *)
let defaultVersion = (10, 1) in
let defaultVersion = (11, 0) in
try
let value = Sys.getenv "RESCRIPT_VERSION" in
let version =
Expand Down
31 changes: 17 additions & 14 deletions analysis/tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions analysis/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"private": true,
"devDependencies": {
"@rescript/react": "^0.11.0-rc.3"
"@rescript/react": "0.12.0"
},
"dependencies": {
"rescript": "11.0.0-alpha.1"
"rescript": "11.0.1"
}
}
4 changes: 2 additions & 2 deletions analysis/tests/src/Auto.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open! Belt
open! ShadowedBelt

let m = List.map
// ^hov
// ^hov
4 changes: 2 additions & 2 deletions analysis/tests/src/Debug.res
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// turn on by adding this comment // ^db+

let _ = Belt.List.map
// ^def
let _ = ShadowedBelt.List.map
// ^def

let _ = List.map
// ^def
Expand Down
2 changes: 1 addition & 1 deletion analysis/tests/src/Definition.res
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type typeInner = Inner.tInner
let m1 = List.map
// ^hov

open Belt
open ShadowedBelt
let m2 = List.map
// ^hov

Expand Down
3 changes: 3 additions & 0 deletions analysis/tests/src/ShadowedBelt.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module List = {
let map = (l, fn) => List.map(fn, l)
}
2 changes: 1 addition & 1 deletion analysis/tests/src/expected/Auto.res.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Hover src/Auto.res 2:13
{"contents": {"kind": "markdown", "value": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n---\n\n```\n \n```\n```rescript\ntype Belt.List.t<'a> = list<'a>\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22belt_List.mli%22%2C34%2C0%5D)\n\n\n\n Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```\n"}}
{"contents": {"kind": "markdown", "value": "```rescript\n(list<'a>, 'a => 'b) => list<'b>\n```"}}

Loading

0 comments on commit 4653a00

Please sign in to comment.