Skip to content

Instantly share code, notes, and snippets.

View test_naming.md
  • The inclusion of _it_ seems unnecessary in the context of these isolated tests, UNLESS additional clarity is desired, in which case this should include the function name under test, which seems pretty common.

it is often used in JS tests/specs in the sense:

describe( 'disableBlockEditorForNavigationPostType', () => {
    // Some suites use "it"
    it( 'should only disable block editor for navigation post types',      () => {})
    // Some suites use "test"
    test( 'it should only disable block editor for navigation post types', () => {})
 // For suites using "test", removing "it" is common
@costdev
costdev / is_virtualbox.php
Last active Mar 30, 2022
A small WordPress plugin which attempts to detect VirtualBox.
View is_virtualbox.php
<?php
/**
* Plugin Name: VirtualBox Detection.
* Description: Attempt to detect VirtualBox.
* Author: WordPress Core Contributors
* Author URI: https://make.wordpress.org/core
* License: GPLv2 or later.
* Version: 1.0.1
* Gist Plugin URI: https://gist.github.com/costdev/75138bbb72f77166e05cf49b5952f821
*/