Skip to content

Instantly share code, notes, and snippets.

View costdev's full-sized avatar

Colin Stewart costdev

View GitHub Profile
costdev / is_virtualbox.php
Last active March 30, 2022 03:48
A small WordPress plugin which attempts to detect VirtualBox.
View is_virtualbox.php
* Plugin Name: VirtualBox Detection.
* Description: Attempt to detect VirtualBox.
* Author: WordPress Core Contributors
* Author URI:
* License: GPLv2 or later.
* Version: 1.0.1
* Gist Plugin URI:
  • 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