-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
101ead3
commit f485808
Showing
9 changed files
with
62 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: "@yarnpkg/plugin-workspace-tools" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import GreenlightPlatform from '..' | ||
|
||
export default class App { | ||
|
||
private _platform:GreenlightPlatform | ||
|
||
constructor(platform:GreenlightPlatform){ | ||
this._platform = platform | ||
} | ||
|
||
ping() { | ||
return 'pong' | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import Authentication from './authentication' | ||
import Gamepass from './gamepass' | ||
import App from './app' | ||
|
||
export default { | ||
Authentication: Authentication, | ||
Gamepass: Gamepass | ||
Gamepass: Gamepass, | ||
App: App, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,37 @@ | ||
import GreenlightPlatform from '../src/index' | ||
import GreenlightPlatform from '../dist/index' | ||
import { expect } from 'chai' | ||
|
||
describe('GreenlightPlatform', () => { | ||
|
||
describe('new instance', () => { | ||
it('should create an instance of GreenlightPlatform', function(){ | ||
const auth = new GreenlightPlatform() | ||
expect(auth).to.be.an.instanceOf(GreenlightPlatform) | ||
const platform = new GreenlightPlatform() | ||
expect(platform).to.be.an.instanceOf(GreenlightPlatform) | ||
}) | ||
}) | ||
|
||
describe('load worker', () => { | ||
it('should be able to load', async function(){ | ||
const platform = new GreenlightPlatform() | ||
expect(platform).to.be.an.instanceOf(GreenlightPlatform) | ||
|
||
const workerState = await platform.loadWorker() | ||
expect(workerState).to.be.oneOf([true, false]) | ||
|
||
await platform.close() | ||
}) | ||
|
||
it('should be able to retrieve data', async function(){ | ||
const platform = new GreenlightPlatform() | ||
expect(platform).to.be.an.instanceOf(GreenlightPlatform) | ||
|
||
const workerState = await platform.loadWorker() | ||
expect(workerState).to.be.oneOf([true, false]) | ||
|
||
const pingReply = await platform.api.App.ping() | ||
expect(pingReply).to.equal('pong') | ||
|
||
await platform.close() | ||
}) | ||
}) | ||
}) |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import StoreApi from '../src/index' | ||
import { Xal } from 'xal-node' | ||
|
||
import { expect } from 'chai' | ||
|
||
|
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