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
ApiResponse.macro('assertBodyStructure', function (expected: any) { | |
this.ensureHasAssert(); | |
const assertHasShape = (expectedShape: any, actual: any) => { | |
this.assert!.equal( | |
types.lookup(actual), | |
types.lookup(expectedShape), | |
`failed when evaluating ${JSON.stringify( | |
expectedShape, | |
null, |
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
import { PluginFn } from '@japa/runner'; | |
import { Assert } from '@japa/assert'; | |
import Database from '@ioc:Adonis/Lucid/Database'; | |
declare module '@japa/assert' { | |
interface Assert { | |
seeInDatabase(tableName: string, data: {}, count?: number): Promise<void>; | |
notInDatabase(tableName: string, data: {}): Promise<void>; | |
seeSoftDeletedInDatabase(tableName: string, data: {}, count?: number): Promise<void>; | |
} |
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
class DuskBrowserServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap the application services. | |
* | |
* @return void | |
*/ | |
public function boot(): void | |
{ | |
Browser::macro('assertExpectedDomText', function (string $selector): Browser { |
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
/** | |
* Created by Feek on 7/29/16. | |
*/ | |
define([ | |
'backbone', | |
'marionette' | |
], function ( | |
Backbone, | |
Marionette | |
) { |
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
#!/bin/bash:w | |
alias grep='grep --color=auto' | |
alias plz='sudo !!' | |
alias ns='node server.js' | |
alias bi='bower install' | |
alias ls='ls -GFha' | |
#git | |
alias gs='git status' | |
alias gb='git branch' |