Skip to content

Commit ce8e5c9

Browse files
committed
(new test bsb) Test deprecation of top-level suffix field
1 parent 2fa8b0b commit ce8e5c9

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
*.exe
2+
*.obj
3+
*.out
4+
*.compile
5+
*.native
6+
*.byte
7+
*.cmo
8+
*.annot
9+
*.cmi
10+
*.cmx
11+
*.cmt
12+
*.cmti
13+
*.cma
14+
*.a
15+
*.cmxa
16+
*.obj
17+
*~
18+
*.annot
19+
*.cmj
20+
*.bak
21+
lib/bs
22+
*.mlast
23+
*.mliast
24+
.vscode
25+
.merlin
26+
**/*.bs.js
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "x",
3+
"sources": ".",
4+
"package-specs": [
5+
{
6+
"module": "commonjs",
7+
"in-source": true
8+
}
9+
],
10+
"suffix": ".bs.js"
11+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
let str = "Hello, world!"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var child_process = require('child_process')
2+
3+
var assert = require('assert').strict
4+
5+
var output = child_process.spawnSync('bsb -clean-world && bsb -make-world',
6+
{
7+
cwd: __dirname,
8+
encoding: 'utf8',
9+
stdio : ['inherit','inherit','pipe'],
10+
shell : true
11+
}
12+
)
13+
14+
// Should warn the user about the deprecation,
15+
assert.match(output.stderr, /top-level 'suffix' field is deprecated/)
16+
17+
// ... but still respect it
18+
assert.equal(output.status, 0)
19+
assert.ok(require('./demo.bs'))

0 commit comments

Comments
 (0)