By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| const admin = require("admin"); | |
| function getFirebaseUser(req, res, next) { | |
| console.log("Check if request is authorized with Firebase ID token"); | |
| if ( | |
| !req.headers.authorization || | |
| !req.headers.authorization.startsWith("Bearer ") | |
| ) { | |
| console.error( | |
| "No Firebase ID token was passed as a Bearer token in the Authorization header.", |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| // Refer to https://gist.github.com/remy/350433 | |
| try { | |
| // Test webstorage existence. | |
| if (!window.localStorage || !window.sessionStorage) throw "exception"; | |
| // Test webstorage accessibility - Needed for Safari private browsing. | |
| localStorage.setItem('storage_test', 1); | |
| localStorage.removeItem('storage_test'); | |
| } catch(e) { | |
| (function () { | |
| var Storage = function (type) { |
| <?php | |
| // ... | |
| protected $middleware = [ | |
| // ... | |
| 'App\Http\Middleware\CloudFlareProxies', | |
| ]; | |
| // ... |
| exports.config = { | |
| // The address of a running selenium server. | |
| seleniumAddress: 'http://localhost:4444/wd/hub', | |
| // Capabilities to be passed to the webdriver instance. | |
| capabilities: { | |
| // 'browserName': 'internet explorer', - special installation needed | |
| // 'version':'10', | |
| 'browserName': 'chrome', | |
| //'browserName': 'firefox' |
Put test1.js and test2.js into a tests/ directory, then run the suite:
$ casperjs test tests/ --pre=pre.js --includes=inc.js --post=post.js
Test file: /Users/nperriault/tmp/pre-inc/pre.js
Hey, I'm executed before the suite.
Test file: /Users/nperriault/tmp/pre-inc/tests/test1.js
# this is test 1
Hi, I've been included.
PASS Subject is strictly true