<commit_before>const { BN, expectEvent } = require('@openzeppelin/test-helpers');

const { expect } = require('chai');
const { artifacts } = require('hardhat');

const ERC1155URIStorageMock = artifacts.require('ERC1155URIStorageMock');

contract(['ERC1155URIStorage'], function (accounts) {
  const [ holder ] = accounts;

  const erc1155Uri = 'https://token.com/nfts/';
  const baseUri = 'https://token.com/';

  const tokenId = new BN('1');
  const amount = new BN('3000');

  describe('with base uri set', function () {
    beforeEach(async function () {
      this.token = await ERC1155URIStorageMock.new(erc1155Uri);
      this.token.setBaseURI(baseUri);

      await this.token.mint(holder, tokenId, amount, '0x');
    });

    it('can request the token uri, returning the erc1155 uri if no token uri was set', async function () {
      const receivedTokenUri = await this.token.uri(tokenId);

      expect(receivedTokenUri).to.be.equal(erc1155Uri);
    });

    it('can request the token uri, returning the concatenated uri if a token uri was set', async function () {
      const tokenUri = '1234/';
      const receipt = await this.token.setURI(tokenId, tokenUri);<commit_msg>Add forgotten await to ERC1155URIStorage beforeEach block. (#3807)<commit_after>const { BN, expectEvent } = require('@openzeppelin/test-helpers');

const { expect } = require('chai');
const { artifacts } = require('hardhat');

const ERC1155URIStorageMock = artifacts.require('ERC1155URIStorageMock');

contract(['ERC1155URIStorage'], function (accounts) {
  const [ holder ] = accounts;

  const erc1155Uri = 'https://token.com/nfts/';
  const baseUri = 'https://token.com/';

  const tokenId = new BN('1');
  const amount = new BN('3000');

  describe('with base uri set', function () {
    beforeEach(async function () {
      this.token = await ERC1155URIStorageMock.new(erc1155Uri);
      await this.token.setBaseURI(baseUri);

      await this.token.mint(holder, tokenId, amount, '0x');
    });

    it('can request the token uri, returning the erc1155 uri if no token uri was set', async function () {
      const receivedTokenUri = await this.token.uri(tokenId);

      expect(receivedTokenUri).to.be.equal(erc1155Uri);
    });

    it('can request the token uri, returning the concatenated uri if a token uri was set', async function () {
      const tokenUri = '1234/';
      const receipt = await this.token.setURI(tokenId, tokenUri);
{'fraction_non_alphanumeric': 0.1350349938246192, 'fraction_numerical': 0.03787566899958831, 'mean_word_length': 4.020661157024794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6983791', 'n_tokens_mistral': 814, 'n_tokens_neox': 732, 'n_words': 199}