This file contains hidden or 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
| const expect = require('chai').expect; | |
| const sinon = require('sinon'); | |
| const asyncConcatService = require("../../../lib/asyncConcatService"); | |
| let asyncConcat = require("../../../functions/asyncConcat"); | |
| describe('asyncConcat', function asyncConcatTest() { | |
| let concatStub; |
This file contains hidden or 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
| const expect = require('chai').expect; | |
| const asyncConcatService = require('../../../lib/asyncConcatService'); | |
| describe('asyncConcatService', function () { | |
| it('concats', async () => { | |
| let a = "Serverless"; | |
| let b = "is awesome"; | |
| let result = await asyncConcatService.concat(a, b); |
This file contains hidden or 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
| const { spawn } = require('child_process'); | |
| const getSlsOfflinePort = require('./support/getSlsOfflinePort'); | |
| let slsOfflineProcess; | |
| before(function (done) { | |
| // increase mocha timeout for this hook to allow sls offline to start | |
| this.timeout(30000); | |
| console.log("[Tests Bootstrap] Start"); |
This file contains hidden or 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
| const request = require('supertest'); | |
| const expect = require('chai').expect; | |
| const getSlsOfflinePort = require('../support/getSlsOfflinePort'); | |
| describe('getAsyncConcat', function getAsyncConcatTest() { | |
| it('ok', function it(done) { | |
| request(`http://localhost:${getSlsOfflinePort()}`) | |
| .get(`/asyncConcat?a=it&b=works`) | |
| .expect(200) |
This file contains hidden or 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
| package gcf_go_image_resizer | |
| import ( | |
| "bytes" | |
| "errors" | |
| "github.com/disintegration/imaging" | |
| "image" | |
| "image/jpeg" | |
| "io" | |
| "net/http" |
This file contains hidden or 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
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| "time" |
This file contains hidden or 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
| package main | |
| import ( | |
| "syscall/js" | |
| ) | |
| func main() { | |
| // exit channel | |
| ch := make(chan struct{}) |
This file contains hidden or 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
| package main | |
| import ( | |
| "syscall/js" | |
| ) | |
| func Init(args []js.Value) { | |
| elevators := args[0] | |
| //floors := args[1] |
This file contains hidden or 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
| package api | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "net/http" | |
| "os" |
This file contains hidden or 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
| window.GoWasmBuilder = { | |
| exitWasm: null, | |
| codeObj: null, | |
| mod: null, | |
| inst: null, | |
| apiRoot: null, | |
| async init(bytes) { | |
| // load the go module | |
| GoWasmBuilder.go = new Go(); |