Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b93919
commit 5e4fbd9
Showing
7 changed files
with
47 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
3 changes: 3 additions & 0 deletions
3
packages/core/integration-tests/test/integration/kotlin/index.js
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,3 @@ | ||
var test = require('./test.kt'); | ||
|
||
module.exports = test.sum(2, 3); |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/kotlin/test.kt
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 @@ | ||
@JsName("sum") | ||
fun sum(a: Int, b: Int): Int { | ||
return a + b | ||
} |
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,17 @@ | ||
const assert = require('assert'); | ||
const fs = require('@parcel/fs'); | ||
const {bundle, assertBundleTree, run} = require('./utils'); | ||
|
||
describe('kotlin', function() { | ||
it('should produce a basic kotlin bundle', async function() { | ||
let b = await bundle(__dirname + '/integration/kotlin/index.js'); | ||
|
||
await assertBundleTree(b, { | ||
type: 'js', | ||
assets: ['test.kt', 'index.js', 'browser.js', 'kotlin.js'] | ||
}); | ||
|
||
let output = await run(b); | ||
assert.equal(output, 5); | ||
}); | ||
}); |
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