Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Oct 23, 2023
1 parent baca3d4 commit 9182ac3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 248 deletions.
237 changes: 0 additions & 237 deletions languageserver/test/FungibleToken.cdc

This file was deleted.

1 change: 1 addition & 0 deletions languageserver/test/a.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub contract A {}
10 changes: 3 additions & 7 deletions languageserver/test/flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
"contracts": {
"Foo": "./foo.cdc",
"Bar": "./bar.cdc",
"FungibleToken": {
"source": "./FungibleToken.cdc",
"aliases": {
"emulator": "0xee82856bf20e2aa6",
"testnet": "0x9a0766d93b6608b7",
"mainnet": "0xf233dcee88fe0abe"
}
"A": {
"source": "./a.cdc",
"aliases": {}
}
},
"networks": {
Expand Down
8 changes: 4 additions & 4 deletions languageserver/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ describe("diagnostics", () => {
}

const fooContractCode = fs.readFileSync('./foo.cdc', 'utf8')
const ftContractCode = fs.readFileSync('./FungibleToken.cdc', 'utf8')
const aContractCode = fs.readFileSync('./a.cdc', 'utf8')

async function testImports(docs: TestDoc[]): Promise<DocNotification[]> {
return new Promise<DocNotification[]>(resolve => {
Expand Down Expand Up @@ -395,15 +395,15 @@ describe("diagnostics", () => {
})

test("script with string import aliased contract", async () => {
const contractName = "FungibleToken";
const contractName = "A";
const scriptName = "script";
const scriptCode = `
import "FungibleToken"
import "A"
pub fun main() { }
`;

let docNotifications = await testImports([
{ name: contractName, code: ftContractCode },
{ name: contractName, code: aContractCode },
{ name: scriptName, code: scriptCode },
]);

Expand Down

0 comments on commit 9182ac3

Please sign in to comment.