Giter VIP home page Giter VIP logo

mzika's Introduction

Mzika

A Go Video Music package.

Integration Tests

As much as possible, a testing philosophy was followed in the development of this package. To that end, one can run the integration test which will verify that the core logic of the package is still working as expected:

$ go test -v

Note that the tests performed are real integration-level tests as they do make network requests. Consequently, it is possible to get spurious failures arising from network issues.

Dependencies

You need to have GopherJS installed inorder to generate the Javascript code.

Browser Testing

You can manually test the generated Javascript function by opening the js/indx.html file in your Browser and using the JS Console.

# Build/Generate the Javascript
$ cd js
$ gopherjs build

# Start a Web Server
$ python -m SimpleHTTPServer

# Open page in browser
http://localhost:8000/index.html

# Test a query.
* Open JS Console
* Execute function below:
mzika.loadTopVideoJSONListingMostFavoritedToday(1, function(result, err) { console.log(result,err); });
# Should see output like below in Console
Object { Success: true, Result: Array[200] } null

NodeJS Testing

There is also a JS file index.js that I had created to use for testing under NodeJS. However, as of the moment, this is not working because the net.Http requests fail to execute. I suspect this may be due to XHR somehow being unavaiable/inaccessible which is strange. Something to fix in the future as it will provide a nice avenue for quick feedback when making changes without having to rely on Browser. That said, the compiled Code Works fine in the target priemier platform which is a Browser JS execution engine which is what matters most.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.