Gutenberg get block name

From the props object we can get the block information. The object contains the name property you are looking for; this would be the code:

const addClassName = createHigherOrderComponent(BlockListBlock => {
    return props => {
        if (props.name === "myplugin/myblock") {
            return <BlockListBlock {...props} className="test" />;
        }
        return <BlockListBlock {...props} />;
    };
}, "addClassName");

wp.hooks.addFilter(
    "editor.BlockListBlock",
    "myplugin/add-class-name",
    addClassName
);